Changeset 103001 in vbox
- Timestamp:
- Jan 23, 2024 4:00:43 PM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 161233
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assertcompile.h
r99791 r103001 56 56 */ 57 57 58 58 59 /** 59 60 * RTASSERTTYPE is the type the AssertCompile() macro redefines. … … 61 62 * Visual C++ uses this. 62 63 */ 64 #ifndef __ASSEMBLER__ 63 65 typedef int RTASSERTTYPE[1]; 66 #endif 64 67 65 68 /** … … 76 79 * for 4.x+ to prevent linkage confusion. 77 80 */ 78 #if !defined(__cplusplus) || !defined(__GNUC__) 81 #ifndef __ASSEMBLER__ 82 # if !defined(__cplusplus) || !defined(__GNUC__) 79 83 extern int RTASSERTVAR[1]; 80 # elif RT_GNUC_PREREQ(4, 0) || defined(__clang_major__) /* Not sure when they fixed the global scoping __unused__/whatever problem. */84 # elif RT_GNUC_PREREQ(4, 0) || defined(__clang_major__) /* Not sure when they fixed the global scoping __unused__/whatever problem. */ 81 85 RT_C_DECLS_BEGIN 82 86 extern int RTASSERTVAR[1]; 83 87 RT_C_DECLS_END 88 # endif 84 89 #endif 85 90 … … 87 92 * Indicates that the compiler implements static_assert(expr, msg). 88 93 */ 89 #ifdef _MSC_VER 90 # if _MSC_VER >= 1600 && defined(__cplusplus) && !defined(VBOX_WITH_PARFAIT) 94 #ifndef __ASSEMBLER__ 95 # ifdef _MSC_VER 96 # if _MSC_VER >= 1600 && defined(__cplusplus) && !defined(VBOX_WITH_PARFAIT) 91 97 # define RTASSERT_HAVE_STATIC_ASSERT 92 # endif 93 #endif 94 #if defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) 95 # define RTASSERT_HAVE_STATIC_ASSERT 96 #endif 97 #if RT_CLANG_PREREQ(6, 0) 98 # if __has_feature(cxx_static_assert) || __has_feature(c_static_assert) 98 # endif 99 # endif 100 # if defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) 99 101 # define RTASSERT_HAVE_STATIC_ASSERT 102 # endif 103 # if RT_CLANG_PREREQ(6, 0) 104 # if __has_feature(cxx_static_assert) || __has_feature(c_static_assert) 105 # define RTASSERT_HAVE_STATIC_ASSERT 106 # endif 100 107 # endif 101 108 #endif … … 112 119 * @param expr Expression which should be true. 113 120 */ 114 #ifdef __GNUC__ 121 #ifdef __ASSEMBLER__ 122 # define AssertCompileNS(expr) 123 #elif defined(__GNUC__) 115 124 # define AssertCompileNS(expr) AssertCompileNS2(expr,RTASSERTVAR) 116 125 # define AssertCompileNS2(expr,a_VarName) extern int a_VarName[ 1 ] __attribute__((__unused__)), \ -
trunk/include/iprt/stdint.h
r98103 r103001 54 54 && !defined(IPRT_NO_CRT) \ 55 55 && !defined(IPRT_DONT_USE_SYSTEM_STDINT_H) \ 56 && !defined(DOXYGEN_RUNNING) 56 && !defined(DOXYGEN_RUNNING) \ 57 && !defined(__ASSEMBLER__) 57 58 58 59 # ifndef __STDC_CONSTANT_MACROS … … 84 85 # endif /* 64-bit darwin kludge. */ 85 86 86 #elif defined(RT_OS_FREEBSD) && defined(_KERNEL) 87 #elif defined(RT_OS_FREEBSD) && defined(_KERNEL) && !defined(__ASSEMBLER__) 87 88 88 89 # ifndef __STDC_CONSTANT_MACROS … … 94 95 # include <sys/stdint.h> 95 96 96 #elif defined(RT_OS_NETBSD) && defined(_KERNEL) 97 #elif defined(RT_OS_NETBSD) && defined(_KERNEL) && !defined(__ASSEMBLER__) 97 98 98 99 # ifndef __STDC_CONSTANT_MACROS … … 132 133 || defined(RT_ARCH_ARM32) || defined(RT_ARCH_ARM64) \ 133 134 || defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64) 134 # if !defined(_INT8_T_DECLARED) && !defined(_INT8_T) 135 # ifndef __ASSEMBLER__ 136 # if !defined(_INT8_T_DECLARED) && !defined(_INT8_T) 135 137 typedef signed char int8_t; 136 # endif137 # if !defined(_UINT8_T_DECLARED) && !defined(_UINT8_T)138 # endif 139 # if !defined(_UINT8_T_DECLARED) && !defined(_UINT8_T) 138 140 typedef unsigned char uint8_t; 139 # endif140 # if !defined(_INT16_T_DECLARED) && !defined(_INT16_T)141 # endif 142 # if !defined(_INT16_T_DECLARED) && !defined(_INT16_T) 141 143 typedef signed short int16_t; 142 # endif143 # if !defined(_UINT16_T_DECLARED) && !defined(_UINT16_T)144 # endif 145 # if !defined(_UINT16_T_DECLARED) && !defined(_UINT16_T) 144 146 typedef unsigned short uint16_t; 145 # endif146 # if !defined(_INT32_T_DECLARED) && !defined(_INT32_T)147 # if ARCH_BITS != 16147 # endif 148 # if !defined(_INT32_T_DECLARED) && !defined(_INT32_T) 149 # if ARCH_BITS != 16 148 150 typedef signed int int32_t; 149 # else151 # else 150 152 typedef signed long int32_t; 151 # endif152 # endif153 # if !defined(_UINT32_T_DECLARED) && !defined(_UINT32_T)154 # if ARCH_BITS != 16153 # endif 154 # endif 155 # if !defined(_UINT32_T_DECLARED) && !defined(_UINT32_T) 156 # if ARCH_BITS != 16 155 157 typedef unsigned int uint32_t; 156 # else158 # else 157 159 typedef unsigned long uint32_t; 158 # endif159 # endif160 # if defined(_MSC_VER)161 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T)160 # endif 161 # endif 162 # if defined(_MSC_VER) 163 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T) 162 164 typedef signed _int64 int64_t; 163 # endif164 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T)165 # endif 166 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T) 165 167 typedef unsigned _int64 uint64_t; 166 # endif167 # elif defined(__WATCOMC__)168 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T)168 # endif 169 # elif defined(__WATCOMC__) 170 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T) 169 171 typedef signed __int64 int64_t; 170 # endif171 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T)172 # endif 173 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T) 172 174 typedef unsigned __int64 uint64_t; 173 # endif174 # elif defined(IPRT_STDINT_USE_STRUCT_FOR_64_BIT_TYPES)175 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T)175 # endif 176 # elif defined(IPRT_STDINT_USE_STRUCT_FOR_64_BIT_TYPES) 177 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T) 176 178 typedef struct { uint32_t lo; int32_t hi; } int64_t; 177 # endif178 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T)179 # endif 180 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T) 179 181 typedef struct { uint32_t lo; uint32_t hi; } uint64_t; 180 # endif181 # else /* Use long long for 64-bit types */182 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T)182 # endif 183 # else /* Use long long for 64-bit types */ 184 # if !defined(_INT64_T_DECLARED) && !defined(_INT64_T) 183 185 typedef signed long long int64_t; 184 # endif185 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T)186 # endif 187 # if !defined(_UINT64_T_DECLARED) && !defined(_UINT64_T) 186 188 typedef unsigned long long uint64_t; 187 # endif188 # endif189 # endif 190 # endif 189 191 190 192 /* max integer types */ 191 # if !defined(_INTMAX_T_DECLARED) && !defined(_INTMAX_T)193 # if !defined(_INTMAX_T_DECLARED) && !defined(_INTMAX_T) 192 194 typedef int64_t intmax_t; 193 # endif194 # if !defined(_UINTMAX_T_DECLARED) && !defined(_UINTMAX_T)195 # endif 196 # if !defined(_UINTMAX_T_DECLARED) && !defined(_UINTMAX_T) 195 197 typedef uint64_t uintmax_t; 196 # endif 198 # endif 199 # endif /* !__ASSEMBLER__ */ 197 200 198 201 /* smallest minimum-width integer types - assumes to be the same as above! */ 202 # ifndef __ASSEMBLER__ 199 203 typedef int8_t int_least8_t; 200 204 typedef uint8_t uint_least8_t; 205 # endif 201 206 # define INT_LEAST8_MIN INT8_MIN 202 207 # define INT_LEAST8_MAX INT8_MAX 203 208 # define UINT_LEAST8_MAX UINT8_MAX 209 # ifndef __ASSEMBLER__ 204 210 typedef int16_t int_least16_t; 205 211 typedef uint16_t uint_least16_t; 212 # endif 206 213 # define INT_LEAST16_MIN INT16_MIN 207 214 # define INT_LEAST16_MAX INT16_MAX 208 215 # define UINT_LEAST16_MAX UINT16_MAX 216 # ifndef __ASSEMBLER__ 209 217 typedef int32_t int_least32_t; 210 218 typedef uint32_t uint_least32_t; 219 # endif 211 220 # define INT_LEAST32_MIN INT32_MIN 212 221 # define INT_LEAST32_MAX INT32_MAX 213 222 # define UINT_LEAST32_MAX UINT32_MAX 223 # ifndef __ASSEMBLER__ 214 224 typedef int64_t int_least64_t; 215 225 typedef uint64_t uint_least64_t; 226 # endif 216 227 # define INT_LEAST64_MIN INT64_MIN 217 228 # define INT_LEAST64_MAX INT64_MAX … … 219 230 220 231 /* fastest minimum-width integer types */ 232 # ifndef __ASSEMBLER__ 221 233 typedef signed char int_fast8_t; 222 234 typedef unsigned char uint_fast8_t; 235 # endif 223 236 # define INT_FAST8_MIN INT8_MIN 224 237 # define INT_FAST8_MAX INT8_MAX 225 238 # define UINT_FAST8_MAX UINT8_MAX 239 # ifndef __ASSEMBLER__ 226 240 typedef signed int int_fast16_t; 227 241 typedef unsigned int uint_fast16_t; 242 # endif 228 243 # if ARCH_BITS == 16 229 244 # define INT_FAST16_MIN INT16_MIN … … 235 250 # define UINT_FAST16_MAX UINT32_MAX 236 251 # endif 252 # ifndef __ASSEMBLER__ 237 253 typedef int32_t int_fast32_t; 238 254 typedef uint32_t uint_fast32_t; 255 # endif 239 256 # define INT_FAST32_MIN INT32_MIN 240 257 # define INT_FAST32_MAX INT32_MAX 241 258 # define UINT_FAST32_MAX UINT32_MAX 259 # ifndef __ASSEMBLER__ 242 260 typedef int64_t int_fast64_t; 243 261 typedef uint64_t uint_fast64_t; 262 # endif 244 263 # define INT_FAST64_MIN INT64_MIN 245 264 # define INT_FAST64_MAX INT64_MAX … … 253 272 254 273 /* pointer <-> integer types */ 255 # if (!defined(_MSC_VER) && !defined(__WATCOMC__) ) || defined(DOXYGEN_RUNNING)274 # if (!defined(_MSC_VER) && !defined(__WATCOMC__) && !defined(__ASSEMBLER__)) || defined(DOXYGEN_RUNNING) 256 275 # if ARCH_BITS == 32 \ 257 276 || defined(RT_OS_LINUX) \ … … 271 290 # endif 272 291 # endif 273 # endif /* !_MSC_VER */292 # endif /* !_MSC_VER && !__WATCOMC__ && !__ASSEMLBER__ */ 274 293 275 294 #endif /* no system stdint.h */
Note:
See TracChangeset
for help on using the changeset viewer.