< prev index next >

src/hotspot/share/utilities/globalDefinitions_xlc.hpp

Print this page




  69 #endif // USE_XLC_BUILTINS
  70 
  71 // NULL vs NULL_WORD:
  72 // On Linux NULL is defined as a special type '__null'. Assigning __null to
  73 // integer variable will cause gcc warning. Use NULL_WORD in places where a
  74 // pointer is stored as integer value.  On some platforms, sizeof(intptr_t) >
  75 // sizeof(void*), so here we want something which is integer type, but has the
  76 // same size as a pointer.
  77 #ifdef __GNUC__
  78   #error XLC and __GNUC__?
  79 #else
  80   #define NULL_WORD  NULL
  81 #endif
  82 
  83 // AIX also needs a 64 bit NULL to work as a null address pointer.
  84 // Most system includes on AIX would define it as an int 0 if not already defined with one
  85 // exception: /usr/include/dirent.h will unconditionally redefine NULL to int 0 again.
  86 // In this case you need to copy the following defines to a position after #include <dirent.h>
  87 // (see jmv_aix.h).
  88 #ifdef AIX

  89   #ifdef _LP64
  90     #undef NULL
  91     #define NULL 0L
  92   #else
  93     #ifndef NULL
  94       #define NULL 0
  95     #endif
  96   #endif
  97 #endif // AIX
  98 
  99 // Compiler-specific primitive types
 100 // All defs of int (uint16_6 etc) are defined in AIX' /usr/include/stdint.h
 101 
 102 // Additional Java basic types
 103 
 104 typedef uint8_t  jubyte;
 105 typedef uint16_t jushort;
 106 typedef uint32_t juint;
 107 typedef uint64_t julong;
 108 




  69 #endif // USE_XLC_BUILTINS
  70 
  71 // NULL vs NULL_WORD:
  72 // On Linux NULL is defined as a special type '__null'. Assigning __null to
  73 // integer variable will cause gcc warning. Use NULL_WORD in places where a
  74 // pointer is stored as integer value.  On some platforms, sizeof(intptr_t) >
  75 // sizeof(void*), so here we want something which is integer type, but has the
  76 // same size as a pointer.
  77 #ifdef __GNUC__
  78   #error XLC and __GNUC__?
  79 #else
  80   #define NULL_WORD  NULL
  81 #endif
  82 
  83 // AIX also needs a 64 bit NULL to work as a null address pointer.
  84 // Most system includes on AIX would define it as an int 0 if not already defined with one
  85 // exception: /usr/include/dirent.h will unconditionally redefine NULL to int 0 again.
  86 // In this case you need to copy the following defines to a position after #include <dirent.h>
  87 // (see jmv_aix.h).
  88 #ifdef AIX
  89   #include <dirent.h>
  90   #ifdef _LP64
  91     #undef NULL
  92     #define NULL 0L
  93   #else
  94     #ifndef NULL
  95       #define NULL 0
  96     #endif
  97   #endif
  98 #endif // AIX
  99 
 100 // Compiler-specific primitive types
 101 // All defs of int (uint16_6 etc) are defined in AIX' /usr/include/stdint.h
 102 
 103 // Additional Java basic types
 104 
 105 typedef uint8_t  jubyte;
 106 typedef uint16_t jushort;
 107 typedef uint32_t juint;
 108 typedef uint64_t julong;
 109 


< prev index next >