Changeset 117
- Timestamp:
- 06/12/13 00:53:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/common.hh
r111 r117 22 22 #define NV_MSVC 1 23 23 #define NV_GNUC 2 24 #define NV_ BORLAND324 #define NV_CLANG 3 25 25 26 26 // Endianess … … 51 51 #define NV_COMPILER NV_GNUC 52 52 #define NV_COMP_VER (((__GNUC__)*100) + (__GNUC_MINOR__*10) + __GNUC_PATCHLEVEL__) 53 #elif defined( __ BORLANDC__ )54 #define NV_COMPILER NV_ BORLAND55 #define NV_COMP_VER 053 #elif defined( __clang__ ) 54 #define NV_COMPILER NV_CLANG 55 #define NV_COMP_VER (((__clang_major__)*100) + (__clang_minor__*10) + __clang_patchlevel__) 56 56 #else 57 #define NV_COMPILER 0 58 #define NV_COMP_VER 0 57 #error "Unknown compiler!" 59 58 #endif 60 59 … … 89 88 #endif 90 89 91 #if NV_COMPILER == NV_MSVC 92 #if NV_COMP_VER >= 1600 93 #define NV_HAS_CPP0X 94 #elif NV_COMP_VER >= 1200 95 #define NV_HAS_TR1 96 #else 97 #define NV_USE_BOOST 98 #endif 90 #if NV_COMPILER == NV_MSVC && NV_COMP_VER < 1600 91 #error "MSVC 2012+ required!" 99 92 #endif 100 93 101 #if NV_COMPILER == NV_GNUC 102 #if NV_COMP_VER >= 460 103 #define NV_HAS_CPP0X 104 #elif NV_COMP_VER >= 400 105 #define NV_HAS_TR1 106 #else 107 #define NV_USE_BOOST 108 #endif 94 #if NV_COMPILER == NV_GNUC && NV_COMP_VER < 460 95 #error "GCC 4.6+ required!" 109 96 #endif 110 97 98 #if NV_COMPILER == NV_CLANG && NV_COMP_VER < 320 99 #error "clang 3.2+ required!" 100 #endif 111 101 112 102 #if NV_COMPILER == NV_MSVC … … 126 116 #if NV_COMPILER == NV_MSVC 127 117 #define NV_DEPRECATED(func) __declspec(deprecated) func 128 #elif NV_COMPILER == NV_GNUC 118 #elif NV_COMPILER == NV_GNUC || NV_COMPILER == NV_CLANG 129 119 #define NV_DEPRECATED(func) func __attribute__ ((deprecated)) 130 120 #else … … 154 144 typedef signed short sint16; 155 145 typedef signed long sint32; 156 #if NV_COMPILER == NV_MSVC157 typedef signed __int64 sint64;158 #else159 146 typedef signed long long sint64; 160 #endif161 147 162 148 typedef unsigned char uint8; 163 149 typedef unsigned short uint16; 164 150 typedef unsigned long uint32; 165 #if NV_COMPILER == NV_MSVC166 typedef unsigned __int64 uint64;167 #else168 151 typedef unsigned long long uint64; 169 #endif170 152 171 153 typedef unsigned char char8;
Note: See TracChangeset
for help on using the changeset viewer.