hp2FEM
0.1
|
00001 00010 #ifndef _GK_ARCH_H_ 00011 #define _GK_ARCH_H_ 00012 00013 /************************************************************************* 00014 * Architecture-specific differences in header files 00015 **************************************************************************/ 00016 #ifdef LINUX 00017 #if !defined(__USE_XOPEN) 00018 #define __USE_XOPEN 00019 #endif 00020 #if !defined(_XOPEN_SOURCE) 00021 #define _XOPEN_SOURCE 600 00022 #endif 00023 #if !defined(__USE_XOPEN2K) 00024 #define __USE_XOPEN2K 00025 #endif 00026 #endif 00027 00028 00029 #ifdef HAVE_EXECINFO_H 00030 #include <execinfo.h> 00031 #endif 00032 00033 00034 #ifdef __MSC__ 00035 #include "ms_stdint.h" 00036 #include "ms_inttypes.h" 00037 #include "ms_stat.h" 00038 #else 00039 #ifndef SUNOS 00040 #include <stdint.h> 00041 #endif 00042 #include <inttypes.h> 00043 #include <sys/types.h> 00044 #include <sys/resource.h> 00045 #include <sys/time.h> 00046 #endif 00047 00048 00049 /************************************************************************* 00050 * Architecture-specific modifications 00051 **************************************************************************/ 00052 #ifdef WIN32 00053 typedef ptrdiff_t ssize_t; 00054 #endif 00055 00056 00057 #ifdef SUNOS 00058 #define PTRDIFF_MAX INT64_MAX 00059 #endif 00060 00061 #ifdef __MSC__ 00062 /* MSC does not have rint() function */ 00063 #define rint(x) ((int)((x)+0.5)) 00064 00065 /* MSC does not have INFINITY defined */ 00066 #ifndef INFINITY 00067 #define INFINITY FLT_MAX 00068 #endif 00069 #endif 00070 00071 #endif