lib/base/base.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00023 #ifndef EQBASE_BASE_H
00024 #define EQBASE_BASE_H
00025
00026 #include <eq/base/defines.h>
00027
00028 #ifdef WIN32
00029 # ifndef WIN32_VC
00030 # define USE_SYS_TYPES_FD_SET
00031 # endif
00032 # define _USE_MATH_DEFINES
00033 # define _WIN32_WINNT 0x500
00034 # define WIN32_LEAN_AND_MEAN
00035 # define NOMINMAX
00036 # include <Winsock2.h>
00037 # include <Windows.h>
00038 # include <windef.h>
00039 # define EQ_DLLEXPORT __declspec(dllexport)
00040 # define EQ_DLLIMPORT __declspec(dllimport)
00041 # ifdef EQUALIZER_EXPORTS
00042 # define EQ_EXPORT EQ_DLLEXPORT
00043 # define EQ_STLEXTERN
00044 # define GLEW_BUILD
00045 # else
00046 # define EQ_EXPORT EQ_DLLIMPORT
00047 # define EQ_STLEXTERN extern
00048 # endif
00049
00050
00051 # ifdef EQUALIZERSERVERLIBRARY_EXPORTS
00052 # define EQSERVER_EXPORT EQ_DLLEXPORT
00053 # define EQSERVER_STLEXTERN
00054 # else
00055 # define EQSERVER_EXPORT EQ_DLLIMPORT
00056 # define EQSERVER_STLEXTERN extern
00057 # endif
00058 #else // WIN32
00059 # define EQ_DLLEXPORT
00060 # define EQ_DLLIMPORT
00061
00062 # define EQ_EXPORT
00063 # define EQSERVER_DLLEXPORT
00064 # define EQSERVER_DLLIMPORT
00065
00066 # define EQSERVER_EXPORT
00067 #endif
00068
00069
00070
00071 #define EQ_MAX(a,b) ((a)>(b)?(a):(b))
00072 #define EQ_MIN(a,b) ((a)<(b)?(a):(b))
00073
00074 #include <cmath>
00075 #include <cstdio>
00076 #include <cstdlib>
00077 #ifndef WIN32_VC
00078 # include <stdint.h>
00079 # include <sys/param.h>
00080 #endif
00081
00082 #include <eq/base/types.h>
00083
00084
00086 #define EQ_UNDEFINED_UINT32 (0xffffffffu)
00087
00088
00089
00091 #define EQ_TIMEOUT_INDEFINITE 0
00092
00093 #ifdef WIN32_VC
00094
00095 # define EQ_ALIGN8( var ) __declspec (align (8)) var;
00096
00097 # define EQ_ALIGN16( var ) __declspec (align (16)) var;
00098 #else
00099
00100 # define EQ_ALIGN8( var ) var __attribute__ ((aligned (8)));
00101
00102 # define EQ_ALIGN16( var ) var __attribute__ ((aligned (16)));
00103 #endif
00104
00105 #define VMMLIB_CUSTOM_CONFIG
00106 #ifndef NDEBUG
00107 # define VMMLIB_SAFE_ACCESSORS
00108 #endif
00109 #define VMMLIB_ALIGN( var ) var
00110
00111 #ifdef __GNUC__
00112 # if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 0)) )
00113 # define EQ_GCC_4_0_OR_LATER
00114 # endif
00115 # if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) )
00116 # define EQ_GCC_4_1_OR_LATER
00117 # endif
00118 # if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) )
00119 # define EQ_GCC_4_2_OR_LATER
00120 # endif
00121 # if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) )
00122 # define EQ_GCC_4_3_OR_LATER
00123 # endif
00124 # if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) )
00125 # define EQ_GCC_4_4_OR_LATER
00126 # endif
00127 # if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) )
00128 # define EQ_GCC_4_5_OR_LATER
00129 # endif
00130 #endif // GCC
00131
00132 #endif //EQBASE_BASE_H