TCDefines.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
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef _TC_DEFINES_H_
00036 #define _TC_DEFINES_H_
00037
00038 #ifdef _DEBUG
00039 # ifndef DEBUG
00040 # define DEBUG
00041 # endif
00042 #endif
00043
00056
00057 #ifdef _WIN32
00058
00059 #ifndef TCOS_WINDOWS
00060 # define TCOS_WINDOWS 1
00061 #endif
00062 #define NOMINMAX
00063 #endif
00064
00065
00066
00067 #ifdef _WIN32_WCE
00068
00069 #define TCOS_WINCE_40 1
00070 #define TCOS_WINDOWS 1
00071 #endif
00072
00073
00074 #ifndef TCOS_WINDOWS
00075
00076 # define TCOS_POSIX 1
00077 #else
00078 # ifndef _WIN32_WINNT
00079 # define _WIN32_WINNT 0x0500
00080 # define WINVER 0x0500
00081 # endif
00082 #endif
00083
00084
00085
00086
00088 #define TCVERSION_STR "1.4.0"
00089
00090 #define TCPRODUCT_STR "TCSystem"
00091
00092 #define TCPRODUCT_ID_STR TCPRODUCT_STR "(" TCVERSION_STR ")"
00093
00094
00095
00096
00097 #ifdef _MSC_VER
00098 # define TC_EXPORT_DLL __declspec(dllexport)
00099 # define TC_IMPORT_DLL __declspec(dllimport)
00100 # define TC_DLL_LOCAL
00101 #elif defined _GNUC_
00102 # if _GNUC_ > 3
00103 # define TC_EXPORT_DLL __attribute__ ((visibility("default")))
00104 # endif
00105 # if _GNUC_ > 4
00106 # define TC_DLL_LOCAL __attribute__ ((visibility("hidden")))
00107 # endif
00108 #else
00109 #endif
00110
00111 #ifndef TC_DLL_LOCAL
00112 # define TC_DLL_LOCAL
00113 #endif
00114 #ifndef TC_EXPORT_DLL
00115 # define TC_EXPORT_DLL
00116 #endif
00117 #ifndef TC_IMPORT_DLL
00118 # define TC_IMPORT_DLL
00119 #endif
00120
00134 #ifdef TCBASE_EXPORTS
00135 # define TCBASE_API TC_EXPORT_DLL
00136 #else
00137
00138 # define TCBASE_API TC_IMPORT_DLL
00139 #endif
00140
00141
00142
00143
00144 #ifdef TCOS_WINDOWS
00145
00146 # define TC_SINT64_FORMAT "I64d"
00147 # define TC_SINT64_WFORMAT L"I64d"
00148
00149 # define TC_UINT64_FORMAT "I64u"
00150 # define TC_UINT64_WFORMAT L"I64u"
00151
00170 # define TC_UINT64_VAL(val) (val##ui64)
00171 # define TC_SINT64_VAL(val) (val##i64)
00172
00173 #else
00174 # define TC_SINT64_FORMAT "lld"
00175 # define TC_SINT64_WFORMAT L"lld"
00176 # define TC_UINT64_FORMAT "llu"
00177 # define TC_UINT64_WFORMAT L"llu"
00178
00179 # define TC_UINT64_VAL(val) (val##ull)
00180 # define TC_SINT64_VAL(val) (val##ll)
00181 #endif
00182
00183 #if TCOS_WINDOWS
00184 # define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
00185
00186 # ifdef _MSC_VER
00187 # if _MSC_VER < 1300
00188 # define TC_NO_FRIEND_TEMPLATES
00189 # endif
00190
00191 # pragma warning (disable: 4503)
00192
00193 # pragma warning (disable: 4251)
00194
00195 # pragma warning (disable: 4127)
00196
00197 # pragma warning (disable: 4275)
00198 # endif
00199
00200 #endif
00201
00206 #endif // _TC_DEFINES_H_
00207