Mercurial > hg > truffle
diff src/share/vm/utilities/globalDefinitions_gcc.hpp @ 3960:f08d439fab8c
7089790: integrate bsd-port changes
Reviewed-by: kvn, twisti, jrose
Contributed-by: Kurt Miller <kurt@intricatesoftware.com>, Greg Lewis <glewis@eyesbeyond.com>, Jung-uk Kim <jkim@freebsd.org>, Christos Zoulas <christos@zoulas.com>, Landon Fuller <landonf@plausible.coop>, The FreeBSD Foundation <board@freebsdfoundation.org>, Michael Franz <mvfranz@gmail.com>, Roger Hoover <rhoover@apple.com>, Alexander Strange <astrange@apple.com>
author | never |
---|---|
date | Sun, 25 Sep 2011 16:03:29 -0700 |
parents | 6c97c830fb6f |
children | 0368109684cb |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Tue Sep 20 23:50:16 2011 -0700 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Sun Sep 25 16:03:29 2011 -0700 @@ -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