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 # define _USE_MATH_DEFINES
00030 # define _WIN32_WINNT 0x500
00031 # define WIN32_LEAN_AND_MEAN
00032 # define NOMINMAX
00033 # include <Winsock2.h>
00034 # include <Windows.h>
00035 # include <windef.h>
00036 # define EQ_DLLEXPORT __declspec(dllexport)
00037 # define EQ_DLLIMPORT __declspec(dllimport)
00038 # ifdef EQUALIZER_EXPORTS
00039 # define EQ_EXPORT EQ_DLLEXPORT
00040 # define EQ_STLEXTERN
00041 # define GLEW_BUILD
00042 # else
00043 # define EQ_EXPORT EQ_DLLIMPORT
00044 # define EQ_STLEXTERN extern
00045 # endif
00046
00047
00048 # ifdef EQUALIZERSERVERLIBRARY_EXPORTS
00049 # define EQSERVER_EXPORT EQ_DLLEXPORT
00050 # define EQSERVER_STLEXTERN
00051 # else
00052 # define EQSERVER_EXPORT EQ_DLLIMPORT
00053 # define EQSERVER_STLEXTERN extern
00054 # endif
00055 #else // WIN32
00056 # define EQ_DLLEXPORT
00057 # define EQ_DLLIMPORT
00058
00059 # define EQ_EXPORT
00060 # define EQSERVER_DLLEXPORT
00061 # define EQSERVER_DLLIMPORT
00062
00063 # define EQSERVER_EXPORT
00064 #endif
00065
00066
00067
00068 #define EQ_MAX(a,b) ((a)>(b)?(a):(b))
00069 #define EQ_MIN(a,b) ((a)<(b)?(a):(b))
00070
00071 #include <cmath>
00072 #include <cstdio>
00073 #include <cstdlib>
00074 #ifndef WIN32_VC
00075 # include <stdint.h>
00076 # include <sys/param.h>
00077 #endif
00078
00079 #include <eq/base/types.h>
00080
00081
00083 #define EQ_UNDEFINED_UINT32 (0xffffffffu)
00084
00085
00086
00088 #define EQ_TIMEOUT_INDEFINITE 0
00089
00090 #ifdef WIN32_VC
00091
00092 # define EQ_ALIGN8( var ) __declspec (align (8)) var;
00093
00094 # define EQ_ALIGN16( var ) __declspec (align (16)) var;
00095 #else
00096
00097 # define EQ_ALIGN8( var ) var __attribute__ ((aligned (8)));
00098
00099 # define EQ_ALIGN16( var ) var __attribute__ ((aligned (16)));
00100 #endif
00101
00102
00103
00104 #endif //EQBASE_BASE_H