Mercurial > hg > truffle
diff src/share/vm/utilities/globalDefinitions_gcc.hpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | f08d439fab8c |
children | 0368109684cb |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Sat Dec 17 20:50:09 2011 +0100 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Sat Dec 17 21:40:27 2011 +0100 @@ -76,15 +76,28 @@ # include <sys/procfs.h> # endif -#ifdef LINUX +#if defined(LINUX) || defined(_ALLBSD_SOURCE) #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif // __STDC_LIMIT_MACROS #include <inttypes.h> #include <signal.h> +#ifndef __OpenBSD__ #include <ucontext.h> +#endif +#ifdef __APPLE__ + #include <AvailabilityMacros.h> + #if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4) + // Mac OS X 10.4 defines EFL_AC and EFL_ID, + // which conflict with hotspot variable names. + // + // This has been fixed in Mac OS X 10.5. + #undef EFL_AC + #undef EFL_ID + #endif +#endif #include <sys/time.h> -#endif // LINUX +#endif // LINUX || _ALLBSD_SOURCE // 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures // When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in @@ -120,7 +133,7 @@ // 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 LINUX +#ifdef __GNUC__ #ifdef _LP64 #define NULL_WORD 0L #else @@ -132,7 +145,7 @@ #define NULL_WORD NULL #endif -#ifndef LINUX +#if !defined(LINUX) && !defined(_ALLBSD_SOURCE) // Compiler-specific primitive types typedef unsigned short uint16_t; #ifndef _UINT32_T @@ -152,7 +165,7 @@ // prior definition of intptr_t, and add "&& !defined(XXX)" above. #endif // _SYS_INT_TYPES_H -#endif // !LINUX +#endif // !LINUX && !_ALLBSD_SOURCE // Additional Java basic types @@ -244,7 +257,9 @@ inline int g_isnan(float f) { return isnand(f); } #endif inline int g_isnan(double f) { return isnand(f); } -#elif LINUX +#elif defined(__APPLE__) +inline int g_isnan(double f) { return isnan(f); } +#elif defined(LINUX) || defined(_ALLBSD_SOURCE) inline int g_isnan(float f) { return isnanf(f); } inline int g_isnan(double f) { return isnan(f); } #else