Go to the documentation of this file. 31 #ifndef _SG_COMPILER_H 32 #define _SG_COMPILER_H 39 #define SG_STRINGIZE(X) SG_DO_STRINGIZE(X) 40 #define SG_DO_STRINGIZE(X) #X 44 # error Time to upgrade. GNU compilers < 3.0 not supported 45 # elif (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) 46 # warning GCC compilers prior to 3.4 are suspect 49 # define SG_COMPILER_STR "GNU C++ version " SG_STRINGIZE(__GNUC__) "." SG_STRINGIZE(__GNUC_MINOR__) 54 # define SG_COMPILER_STR "Kai C++ version " SG_STRINGIZE(__KCC_VERSION) 61 # define bcopy(from, to, n) memcpy(to, from, n) 63 # if _MSC_VER >= 1200 // msvc++ 6.0 or greater 65 # define snprintf _snprintf 67 # define vsnprintf _vsnprintf 69 # define copysign _copysign 70 # define strcasecmp stricmp 75 # pragma warning(disable: 4786) // identifier was truncated to '255' characters 76 # pragma warning(disable: 4244) // conversion from double to float 77 # pragma warning(disable: 4305) // 80 # error What version of MSVC++ is this? 83 # define SG_COMPILER_STR "Microsoft Visual C++ version " SG_STRINGIZE(_MSC_VER) 91 #if defined ( sgi ) && !defined( __GNUC__ ) 92 # if (_COMPILER_VERSION < 740) 93 # error Need MipsPro 7.4.0 or higher now 96 #define SG_HAVE_NATIVE_SGI_COMPILERS 98 #pragma set woff 1001,1012,1014,1116,1155,1172,1174 99 #pragma set woff 1401,1460,1551,1552,1681 102 # pragma set woff 1682,3303 103 # pragma set woff 3624 106 # define SG_COMPILER_STR "SGI MipsPro compiler version " SG_STRINGIZE(_COMPILER_VERSION) 108 #endif // Native SGI compilers 113 # include <strings.h> 115 # if defined ( __cplusplus ) 118 extern void *memmove(
void *,
const void *,
size_t);
121 extern void *memmove(
void *,
const void *,
size_t);
122 # endif // __cplusplus 124 # if !defined( __GNUC__ ) 125 # define SG_COMPILER_STR "Sun compiler version " SG_STRINGIZE(__SUNPRO_CC) 133 #if defined(__ICC) || defined (__ECC) 134 # define SG_COMPILER_STR "Intel C++ version " SG_STRINGIZE(__ICC) 145 # if ( __GNUC__ > 3 ) || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 3 ) 146 inline int (isnan)(
double r) {
return !(r <= 0 || r >= 0); }
151 extern "C" int (isnan)(double);
152 extern "C" int (isinf)(double);
155 inline int (isnan)(
double r) {
return !(r <= 0 || r >= 0); }
159 #if defined (__FreeBSD__) 161 #include <sys/param.h> 162 # if __FreeBSD_version < 500000 164 inline int isnan(
double r) {
return !(r <= 0 || r >= 0); }
169 #if defined (__CYGWIN__) 176 #if defined(_WIN32) || defined(__WIN32__) 180 #if defined(__linux__) || defined(_AIX) || defined ( sgi ) 188 #endif // _SG_COMPILER_H