3 Copyright (c) Scott Gasch
17 $Id: compiler.h 349 2008-06-28 02:48:59Z scott $
28 #pragma warning(disable:4201) // nonstandard extension: nameless struct/union
29 #pragma warning(disable:4214) // nonstandard extension: bitfields struct
32 #define ALIGN64 __declspec(align(64))
33 #define TB_FASTCALL __fastcall
34 #define COMPILER_STRING "Microsoft(R) Visual C/C++ %u\n", _MSC_VER
37 #define COMPILER_LONGLONG __int64
38 #define COMPILER_VSNPRINTF _vsnprintf
40 #define FASTCALL __fastcall
41 #define INLINE __inline
42 #define FORCEINLINE __forceinline
45 #define COMPILER_LONGLONG_HEX_FORMAT "I64x"
46 #define COMPILER_LONGLONG_UNSIGNED_FORMAT "I64u"
47 #define STRNCMPI _strnicmp
48 #define STRCMPI strcmpi
49 #define STRDUP SystemStrDup
51 #elif defined __GNUC__
57 #define COMPILER_STRING "GCC "__VERSION__"\n"
58 #define BUILD_STRING __OPTIMIZE__
65 #define ALIGN64 // __attribute__ (aligned(64)) does not work
66 #define COMPILER_LONGLONG long long
67 #define COMPILER_VSNPRINTF vsnprintf
69 #define CDECL __attribute__((cdecl))
71 #define FASTCALL __attribute__((__regparm__(3)))
72 #define INLINE __inline__
73 #define FORCEINLINE __attribute__((always_inline))
74 #define NORETURN __attribute__((noreturn))
75 #define CONSTFUNCT __attribute__((const))
76 #define COMPILER_LONGLONG_HEX_FORMAT "llx"
77 #define COMPILER_LONGLONG_UNSIGNED_FORMAT "llu"
78 #define STRNCMPI strncasecmp
79 #define STRCMPI strcasecmp
80 #define STRDUP SystemStrDup
81 #define TB_FASTCALL // __attribute__((__regparm__(3)))
85 #error "Unknown compiler, please edit compiler.h"
87 #endif /* What compiler?! */
89 #endif /* COMPILER_H_ */