10 #ifndef _INC_SysTypes_H
11 #define _INC_SysTypes_H
12 #ifndef NO_PRAGMA_ONCE
70 #if defined(_MSC_VER) && (_MSC_VER >= 1000)
72 #pragma warning(disable:4800)
73 #pragma warning(disable:4251)
76 #pragma warning(disable:4510)
77 #pragma warning(disable:4512)
78 #pragma warning(disable:4610)
89 #define GRAY_COMPILER_NAME "Msc"
90 #define GRAY_COMPILER_VER _MSC_VER
92 #elif defined(__GNUC__)
94 #define GRAY_COMPILER_NAME "gnuc"
95 #define GRAY_COMPILER_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
96 #undef __STRICT_ANSI__
98 #elif defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__)
99 #define GRAY_COMPILER_NAME "cc"
100 #define GRAY_COMPILER_VER 0
101 #error UNSUPPORTED COMPILER
104 #error UNKNOWN COMPILER
108 #if defined(_MSC_VER) && (_MSC_VER < 1000)
109 #define NO_PRAGMA_ONCE
111 #if defined(__GNUC__) && (GRAY_COMPILER_VER >= 30400)
113 #define _NATIVE_WCHAR_T_DEFINED
121 #pragma comment(linker, "/nodefaultlib:libc.lib")
122 #pragma comment(linker, "/nodefaultlib:libcd.lib")
124 #define _WIN32_WCE 0x0500
125 #define WINVER _WIN32_WCE
126 #include <ceconfig.h>
134 #include <SDKDDKVer.h>
140 #define WINVER 0x0600
143 #define _WIN32_WINNT 0x0600
145 #ifndef _WIN32_WINDOWS
146 #define _WIN32_WINDOWS 0x0600
149 #define _WIN32_IE 0x0700
163 #define DEBUG_VALIDATE_ALLOC
167 #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
176 #include <afxtempl.h>
177 #include <Winsock2.h>
185 #if defined(_WIN32) && ! defined(_WINDOWS_)
188 #elif defined(__WINDOWS__)
190 #elif ! defined(_WINDOWS_)
191 #error NO _WINDOWS_ defined?
229 #include <linux/unistd.h>
232 #if defined(_WIN32) && !defined(UNDER_CE) && ! defined(__GNUC__) && USE_CRT
241 #if defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_IA64) || defined(_AMD64_) || defined(__ia64__) || defined(__x86_64__)
243 #define USE_LITTLE_ENDIAN 1
250 #elif defined(_MSC_VER) && ( defined(_M_AMD64) || defined(_M_X64) || defined(_M_IA64))
252 #elif defined(__GNUC__) && ( \
253 defined(__amd64__) || defined(__x86_64__) || \
254 defined(__ppc64__) || defined(__powerpc64__) || \
255 defined(__ia64__) || defined(__alpha__) || \
256 (defined(__sparc__) && defined(__arch64__)) || \
257 defined(__s390x__) || defined(__mips64) )
267 #if defined(__GNUC__) && defined(USE_64BIT)
268 #define USE_LONG_AS_INT64
273 #if defined(_WIN32) && ! defined(WIN32)
276 #if defined(DEBUG) && ! defined(_DEBUG)
280 #if defined(_MSC_VER) || defined(__BORLANDC__)
281 #define __DECL_EXPORT __declspec(dllexport)
282 #define __DECL_IMPORT __declspec(dllimport)
283 #define __DECL_ALIGN(x) __declspec(align(x))
284 #elif defined (__GNUC__)
286 #define __DECL_EXPORT
287 #define __DECL_IMPORT
288 #define __DECL_ALIGN(x)
289 #elif defined(__WATCOMC__)
290 #define __declspec(x)
291 #define __DECL_EXPORT
292 #define __DECL_IMPORT
293 #define __DECL_ALIGN(x)
295 #error UNKNOWN COMPILER
298 #ifndef UNREFERENCED_PARAMETER
299 #define UNREFERENCED_PARAMETER(P) ((void)(P))
303 #if defined(_MSC_VER)
304 #define UNREACHABLE_CODE(x) __assume(0)
305 #elif defined(__GNUC__) && (GRAY_COMPILER_VER >= 40500)
306 #define UNREACHABLE_CODE(x) __builtin_unreachable()
309 #define UNREACHABLE_CODE(x) ASSERT(0); x
313 #define ES_AWAYMODE_REQUIRED ((DWORD)0x00000040)
314 #define UNREFERENCED_REFERENCE(x) ((void)(x))
315 #elif ( _MSC_VER > 1600 )
316 #define UNREFERENCED_REFERENCE UNREFERENCED_PARAMETER
318 #define UNREFERENCED_REFERENCE(x) ((void)(&x))
321 #ifndef DECLSPEC_NOVTABLE
322 #define DECLSPEC_NOVTABLE
328 #ifndef DECLARE_INTERFACE
329 #define interface struct DECLSPEC_NOVTABLE
330 #define DECLARE_INTERFACE(iface) interface iface
331 #define DECLARE_INTERFACE_(iface, baseiface) interface iface : public baseiface
334 #if defined(_MSC_VER) && ( _MSC_VER < 1100 )
340 #if defined(_MSC_VER) && (_MSC_VER < 1300)
341 typedef LONG LONG_PTR;
361 typedef unsigned char BYTE;
362 typedef unsigned short WORD;
364 typedef unsigned int DWORD;
366 typedef unsigned long DWORD;
369 typedef signed short INT16;
370 typedef unsigned short UINT16;
372 typedef __int32_t INT32;
373 typedef __uint32_t UINT32;
376 typedef __int64_t INT64;
377 typedef __uint64_t UINT64;
383 typedef unsigned int UINT;
385 typedef unsigned long ULONG;
388 typedef size_t UINT_PTR;
389 typedef ptrdiff_t INT_PTR;
390 typedef long LONG_PTR;
391 typedef unsigned long ULONG_PTR;
392 typedef unsigned long DWORD_PTR;
395 #define MAKEWORD(l,h) ((WORD)(((BYTE)(l)) | ((WORD)((BYTE)(h))) << 8))
396 #define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((LONG)((WORD)(high))) << 16)))
398 #define LOWORD(l) ((WORD)(l))
399 #define HIWORD(l) ((WORD)(((UINT32)(l) >> 16) & 0xFFFF))
400 #define LOBYTE(w) ((BYTE)(((WORD)(w))&0xFF))
401 #define HIBYTE(w) ((BYTE)(((WORD)(w))>>8))
403 #define CALLBACK GRAYCALL
404 #define STDMETHODCALLTYPE GRAYCALL
406 #define _MAX_PATH PATH_MAX
410 #if defined(__GNUC__) || defined(UNDER_CE)
412 #define _countof(a) ((size_t)(sizeof(a)/sizeof((a)[0])))
416 #define nullptr __null
417 #elif defined(_MSC_VER) && ( _MSC_VER < 1700 ) && ! defined(__cplusplus_cli)
423 #define _MAX_PATH 260
429 #define VOLATILE volatile
436 #elif defined(_WIN16)
444 #ifndef _UINTPTR_T_DEFINED
445 #define _UINTPTR_T_DEFINED
456 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
457 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
460 #define ABS(n) (((n) < 0) ? (-(n)) : (n))
463 #ifndef _HRESULT_DEFINED
464 #define _HRESULT_DEFINED
UINT64 UINTMAX_t
Definition: SysTypes.h:435
INT64 INTMAX_t
Definition: SysTypes.h:434
UINT32 uintptr_t
Definition: SysTypes.h:449
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465