src/share/vm/utilities/globalDefinitions_gcc.hpp

changeset 3156
f08d439fab8c
parent 2750
6c97c830fb6f
child 3587
0368109684cb
     1.1 --- a/src/share/vm/utilities/globalDefinitions_gcc.hpp	Tue Sep 20 23:50:16 2011 -0700
     1.2 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp	Sun Sep 25 16:03:29 2011 -0700
     1.3 @@ -76,15 +76,28 @@
     1.4  # include <sys/procfs.h>
     1.5  # endif
     1.6  
     1.7 -#ifdef LINUX
     1.8 +#if defined(LINUX) || defined(_ALLBSD_SOURCE)
     1.9  #ifndef __STDC_LIMIT_MACROS
    1.10  #define __STDC_LIMIT_MACROS
    1.11  #endif // __STDC_LIMIT_MACROS
    1.12  #include <inttypes.h>
    1.13  #include <signal.h>
    1.14 +#ifndef __OpenBSD__
    1.15  #include <ucontext.h>
    1.16 +#endif
    1.17 +#ifdef __APPLE__
    1.18 +  #include <AvailabilityMacros.h>
    1.19 +  #if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
    1.20 +    // Mac OS X 10.4 defines EFL_AC and EFL_ID,
    1.21 +    // which conflict with hotspot variable names.
    1.22 +    //
    1.23 +    // This has been fixed in Mac OS X 10.5.
    1.24 +    #undef EFL_AC
    1.25 +    #undef EFL_ID
    1.26 +  #endif
    1.27 +#endif
    1.28  #include <sys/time.h>
    1.29 -#endif // LINUX
    1.30 +#endif // LINUX || _ALLBSD_SOURCE
    1.31  
    1.32  // 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures
    1.33  // When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in
    1.34 @@ -120,7 +133,7 @@
    1.35  // pointer is stored as integer value.  On some platforms, sizeof(intptr_t) >
    1.36  // sizeof(void*), so here we want something which is integer type, but has the
    1.37  // same size as a pointer.
    1.38 -#ifdef LINUX
    1.39 +#ifdef __GNUC__
    1.40    #ifdef _LP64
    1.41      #define NULL_WORD  0L
    1.42    #else
    1.43 @@ -132,7 +145,7 @@
    1.44    #define NULL_WORD  NULL
    1.45  #endif
    1.46  
    1.47 -#ifndef LINUX
    1.48 +#if !defined(LINUX) && !defined(_ALLBSD_SOURCE)
    1.49  // Compiler-specific primitive types
    1.50  typedef unsigned short     uint16_t;
    1.51  #ifndef _UINT32_T
    1.52 @@ -152,7 +165,7 @@
    1.53  // prior definition of intptr_t, and add "&& !defined(XXX)" above.
    1.54  #endif // _SYS_INT_TYPES_H
    1.55  
    1.56 -#endif // !LINUX
    1.57 +#endif // !LINUX && !_ALLBSD_SOURCE
    1.58  
    1.59  // Additional Java basic types
    1.60  
    1.61 @@ -244,7 +257,9 @@
    1.62  inline int g_isnan(float  f) { return isnand(f); }
    1.63  #endif
    1.64  inline int g_isnan(double f) { return isnand(f); }
    1.65 -#elif LINUX
    1.66 +#elif defined(__APPLE__)
    1.67 +inline int g_isnan(double f) { return isnan(f); }
    1.68 +#elif defined(LINUX) || defined(_ALLBSD_SOURCE)
    1.69  inline int g_isnan(float  f) { return isnanf(f); }
    1.70  inline int g_isnan(double f) { return isnan(f); }
    1.71  #else

mercurial