1 #ifndef INCLUDED_LIBS_GLOBALDEFS
2 #define INCLUDED_LIBS_GLOBALDEFS
6 #if defined(__BIG_ENDIAN__) || defined(_SGI_SOURCE)
7 #define GDEF_ARCH_ENDIAN_BIG 1
9 #define GDEF_ARCH_ENDIAN_BIG 0
14 #if defined(__i386__) || defined(_M_IX86)
15 #define GDEF_ARCH_BITS_32 1
17 #define GDEF_ARCH_BITS_32 0
20 #if defined(__LP64__) || defined(_M_X64) || defined(_M_AMD64) || defined(_WIN64)
21 #define GDEF_ARCH_BITS_64 1
23 #define GDEF_ARCH_BITS_64 0
29 #define GDEF_OS_POSIX 1
31 #define GDEF_OS_POSIX 0
34 #if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
35 #define GDEF_OS_WINDOWS 1
37 #define GDEF_OS_WINDOWS 0
40 #if defined(__APPLE__)
41 #define GDEF_OS_MACOS 1
43 #define GDEF_OS_MACOS 0
46 #if defined(__linux__)
47 #define GDEF_OS_LINUX 1
49 #define GDEF_OS_LINUX 0
55 #if defined(__FreeBSD__)
58 #define GDEF_OS_BSD_FREE 1
60 #define GDEF_OS_BSD_FREE 0
63 #if defined(__NetBSD__)
66 #define GDEF_OS_BSD_NET 1
68 #define GDEF_OS_BSD_NET 0
71 #if defined(__OpenBSD__)
74 #define GDEF_OS_BSD_OPEN 1
76 #define GDEF_OS_BSD_OPEN 0
79 #if defined(__DragonFly__)
82 #define GDEF_OS_BSD_DRAGONFLY 1
84 #define GDEF_OS_BSD_DRAGONFLY 0
90 #define GDEF_COMPILER_MSVC 1
92 #define GDEF_COMPILER_MSVC 0
96 #define GDEF_COMPILER_GNU 1
98 #define GDEF_COMPILER_GNU 0
103 #if GDEF_COMPILER_GNU
104 #define GDEF_ATTRIBUTE_NORETURN __attribute__((noreturn))
106 #define GDEF_ATTRIBUTE_NORETURN
109 #ifdef GDEF_COMPILER_MSVC
110 #define GDEF_ATTRIBUTE_INLINE __inline
112 #define GDEF_ATTRIBUTE_INLINE inline