< prev index next >

src/share/vm/utilities/globalDefinitions_gcc.hpp

Print this page

        

*** 100,133 **** // // Note: this fix doesn't work well on Linux because NULL will be overwritten // whenever a system header file is included. Linux handles NULL correctly // through a special type '__null'. #ifdef SOLARIS - #ifdef _LP64 #undef NULL #define NULL 0L - #else - #ifndef NULL - #define NULL 0 - #endif - #endif #endif // NULL vs NULL_WORD: // On Linux NULL is defined as a special type '__null'. Assigning __null to // integer variable will cause gcc warning. Use NULL_WORD in places where a // pointer is stored as integer value. On some platforms, sizeof(intptr_t) > // sizeof(void*), so here we want something which is integer type, but has the // same size as a pointer. #ifdef __GNUC__ - #ifdef _LP64 #define NULL_WORD 0L - #else - // Cast 0 to intptr_t rather than int32_t since they are not the same type - // on platforms such as Mac OS X. - #define NULL_WORD ((intptr_t)0) - #endif #else #define NULL_WORD NULL #endif #if !defined(LINUX) && !defined(_ALLBSD_SOURCE) --- 100,121 ----
*** 284,298 **** #if (__GNUC__ == 2) && (__GNUC_MINOR__ >= 96) #define CONST_SDM_BUG #endif // Formatting. - #ifdef _LP64 #define FORMAT64_MODIFIER "l" - #else // !_LP64 - #define FORMAT64_MODIFIER "ll" - #endif // _LP64 // HACK: gcc warns about applying offsetof() to non-POD object or calculating // offset directly when base address is NULL. Use 16 to get around the // warning. gcc-3.4 has an option -Wno-invalid-offsetof to suppress // this warning. --- 272,282 ----
*** 301,313 **** #ifdef offsetof # undef offsetof #endif #define offsetof(klass,field) offset_of(klass,field) ! #if defined(_LP64) && defined(__APPLE__) #define JLONG_FORMAT "%ld" ! #endif // _LP64 && __APPLE__ #ifndef USE_LIBRARY_BASED_TLS_ONLY #define THREAD_LOCAL_DECL __thread #endif --- 285,297 ---- #ifdef offsetof # undef offsetof #endif #define offsetof(klass,field) offset_of(klass,field) ! #if defined(__APPLE__) #define JLONG_FORMAT "%ld" ! #endif // __APPLE__ #ifndef USE_LIBRARY_BASED_TLS_ONLY #define THREAD_LOCAL_DECL __thread #endif
< prev index next >