10 #ifndef MRPT_PSTDINT_H 11 #define MRPT_PSTDINT_H 24 (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L)\ 25 || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250))\ 27 ) && !defined (_PSTDINT_H_INCLUDED) 30 #define _PSTDINT_H_INCLUDED 31 # ifndef PRINTF_INT64_MODIFIER 32 # define PRINTF_INT64_MODIFIER "ll" 34 # ifndef PRINTF_INT32_MODIFIER 35 # define PRINTF_INT32_MODIFIER "l" 37 # ifndef PRINTF_INT16_MODIFIER 38 # define PRINTF_INT16_MODIFIER "h" 40 # ifndef PRINTF_INTMAX_MODIFIER 41 # define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER 43 # ifndef PRINTF_INT64_HEX_WIDTH 44 # define PRINTF_INT64_HEX_WIDTH "16" 46 # ifndef PRINTF_INT32_HEX_WIDTH 47 # define PRINTF_INT32_HEX_WIDTH "8" 49 # ifndef PRINTF_INT16_HEX_WIDTH 50 # define PRINTF_INT16_HEX_WIDTH "4" 52 # ifndef PRINTF_INT8_HEX_WIDTH 53 # define PRINTF_INT8_HEX_WIDTH "2" 55 # ifndef PRINTF_INT64_DEC_WIDTH 56 # define PRINTF_INT64_DEC_WIDTH "20" 58 # ifndef PRINTF_INT32_DEC_WIDTH 59 # define PRINTF_INT32_DEC_WIDTH "10" 61 # ifndef PRINTF_INT16_DEC_WIDTH 62 # define PRINTF_INT16_DEC_WIDTH "5" 64 # ifndef PRINTF_INT8_DEC_WIDTH 65 # define PRINTF_INT8_DEC_WIDTH "3" 67 # ifndef PRINTF_INTMAX_HEX_WIDTH 68 # define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH 70 # ifndef PRINTF_INTMAX_DEC_WIDTH 71 # define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH 79 # if defined (__WATCOMC__) && __WATCOMC__ >= 1250 80 # if !defined (INT64_C) 81 # define INT64_C(x) (x + (INT64_MAX - INT64_MAX)) 83 # if !defined (UINT64_C) 84 # define UINT64_C(x) (x + (UINT64_MAX - UINT64_MAX)) 86 # if !defined (INT32_C) 87 # define INT32_C(x) (x + (INT32_MAX - INT32_MAX)) 89 # if !defined (UINT32_C) 90 # define UINT32_C(x) (x + (UINT32_MAX - UINT32_MAX)) 92 # if !defined (INT16_C) 93 # define INT16_C(x) (x) 95 # if !defined (UINT16_C) 96 # define UINT16_C(x) (x) 98 # if !defined (INT8_C) 99 # define INT8_C(x) (x) 101 # if !defined (UINT8_C) 102 # define UINT8_C(x) (x) 104 # if !defined (UINT64_MAX) 105 # define UINT64_MAX 18446744073709551615ULL 107 # if !defined (INT64_MAX) 108 # define INT64_MAX 9223372036854775807LL 110 # if !defined (UINT32_MAX) 111 # define UINT32_MAX 4294967295UL 113 # if !defined (INT32_MAX) 114 # define INT32_MAX 2147483647L 116 # if !defined (INTMAX_MAX) 117 # define INTMAX_MAX INT64_MAX 119 # if !defined (INTMAX_MIN) 120 # define INTMAX_MIN INT64_MIN 125 #ifndef _PSTDINT_H_INCLUDED 126 #define _PSTDINT_H_INCLUDED 129 # define SIZE_MAX (~(size_t)0) 139 # define UINT8_MAX 0xff 142 # if (UCHAR_MAX == UINT8_MAX) || defined (S_SPLINT_S) 144 # define UINT8_C(v) ((uint8_t) v) 146 # error "Platform not supported" 151 # define INT8_MAX 0x7f 154 # define INT8_MIN INT8_C(0x80) 157 # if (SCHAR_MAX == INT8_MAX) || defined (S_SPLINT_S) 158 typedef signed char int8_t;
159 # define INT8_C(v) ((int8_t) v) 161 # error "Platform not supported" 166 # define UINT16_MAX 0xffff 169 #if (UINT_MAX == UINT16_MAX) || defined (S_SPLINT_S) 171 # ifndef PRINTF_INT16_MODIFIER 172 # define PRINTF_INT16_MODIFIER "" 174 # define UINT16_C(v) ((uint16_t) (v)) 175 #elif (USHRT_MAX == UINT16_MAX) 177 # define UINT16_C(v) ((uint16_t) (v)) 178 # ifndef PRINTF_INT16_MODIFIER 179 # define PRINTF_INT16_MODIFIER "h" 182 #error "Platform not supported" 187 # define INT16_MAX 0x7fff 190 # define INT16_MIN INT16_C(0x8000) 193 #if (INT_MAX == INT16_MAX) || defined (S_SPLINT_S) 195 # define INT16_C(v) ((int16_t) (v)) 196 # ifndef PRINTF_INT16_MODIFIER 197 # define PRINTF_INT16_MODIFIER "" 199 #elif (SHRT_MAX == INT16_MAX) 201 # define INT16_C(v) ((int16_t) (v)) 202 # ifndef PRINTF_INT16_MODIFIER 203 # define PRINTF_INT16_MODIFIER "h" 206 #error "Platform not supported" 211 # define UINT32_MAX (0xffffffffUL) 214 #if (ULONG_MAX == UINT32_MAX) || defined (S_SPLINT_S) 215 # ifndef OPENCV_FLANN_DIST_H_ // An ugly solution to a collision of cvflann for MSC 218 # define UINT32_C(v) v ## UL 219 # ifndef PRINTF_INT32_MODIFIER 220 # define PRINTF_INT32_MODIFIER "l" 222 #elif (UINT_MAX == UINT32_MAX) 224 # ifndef PRINTF_INT32_MODIFIER 225 # define PRINTF_INT32_MODIFIER "" 227 # define UINT32_C(v) v ## U 228 #elif (USHRT_MAX == UINT32_MAX) 230 # define UINT32_C(v) ((unsigned short) (v)) 231 # ifndef PRINTF_INT32_MODIFIER 232 # define PRINTF_INT32_MODIFIER "" 235 #error "Platform not supported" 240 # define INT32_MAX (0x7fffffffL) 243 # define INT32_MIN INT32_C(0x80000000) 246 #if (LONG_MAX == INT32_MAX) || defined (S_SPLINT_S) 248 # define INT32_C(v) v ## L 249 # ifndef PRINTF_INT32_MODIFIER 250 # define PRINTF_INT32_MODIFIER "l" 252 #elif (INT_MAX == INT32_MAX) 254 # define INT32_C(v) v 255 # ifndef PRINTF_INT32_MODIFIER 256 # define PRINTF_INT32_MODIFIER "" 258 #elif (SHRT_MAX == INT32_MAX) 260 # define INT32_C(v) ((short) (v)) 261 # ifndef PRINTF_INT32_MODIFIER 262 # define PRINTF_INT32_MODIFIER "" 265 #error "Platform not supported" 276 #undef stdint_int64_defined 277 #if (defined(__STDC__) && defined(__STDC_VERSION__)) || defined (S_SPLINT_S) 278 # if (__STDC__ && __STDC_VERSION >= 199901L) || defined (S_SPLINT_S) 279 # define stdint_int64_defined 281 typedef unsigned long long uint64_t;
282 # define UINT64_C(v) v ## ULL 283 # define INT64_C(v) v ## LL 284 # ifndef PRINTF_INT64_MODIFIER 285 # define PRINTF_INT64_MODIFIER "ll" 290 #if !defined (stdint_int64_defined) 291 # if defined(__GNUC__) 292 # define stdint_int64_defined 293 __extension__
typedef long long int64_t;
294 __extension__
typedef unsigned long long uint64_t;
295 # define UINT64_C(v) v ## ULL 296 # define INT64_C(v) v ## LL 297 # ifndef PRINTF_INT64_MODIFIER 298 # define PRINTF_INT64_MODIFIER "ll" 300 # elif defined(__MWERKS__) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || defined (__APPLE_CC__) || defined (_LONG_LONG) || defined (_CRAYC) || defined (S_SPLINT_S) 301 # define stdint_int64_defined 303 typedef unsigned long long uint64_t;
304 # define UINT64_C(v) v ## ULL 305 # define INT64_C(v) v ## LL 306 # ifndef PRINTF_INT64_MODIFIER 307 # define PRINTF_INT64_MODIFIER "ll" 309 # elif (defined(__WATCOMC__) && defined(__WATCOM_INT64__)) || (defined(_MSC_VER) && _INTEGRAL_MAX_BITS >= 64) || (defined (__BORLANDC__) && __BORLANDC__ > 0x460) || defined (__alpha) || defined (__DECC) 310 # define stdint_int64_defined 313 # define UINT64_C(v) v ## UI64 314 # define INT64_C(v) v ## I64 315 # ifndef PRINTF_INT64_MODIFIER 316 # define PRINTF_INT64_MODIFIER "I64" 321 #if !defined (LONG_LONG_MAX) && defined (INT64_C) 322 # define LONG_LONG_MAX INT64_C (9223372036854775807) 324 #ifndef ULONG_LONG_MAX 325 # define ULONG_LONG_MAX UINT64_C (18446744073709551615) 328 #if !defined (INT64_MAX) && defined (INT64_C) 329 # define INT64_MAX INT64_C (9223372036854775807) 331 #if !defined (INT64_MIN) && defined (INT64_C) 332 # define INT64_MIN INT64_C (-9223372036854775808) 334 #if !defined (UINT64_MAX) && defined (INT64_C) 335 # define UINT64_MAX UINT64_C (18446744073709551615) 342 #ifndef PRINTF_INT64_HEX_WIDTH 343 # define PRINTF_INT64_HEX_WIDTH "16" 345 #ifndef PRINTF_INT32_HEX_WIDTH 346 # define PRINTF_INT32_HEX_WIDTH "8" 348 #ifndef PRINTF_INT16_HEX_WIDTH 349 # define PRINTF_INT16_HEX_WIDTH "4" 351 #ifndef PRINTF_INT8_HEX_WIDTH 352 # define PRINTF_INT8_HEX_WIDTH "2" 355 #ifndef PRINTF_INT64_DEC_WIDTH 356 # define PRINTF_INT64_DEC_WIDTH "20" 358 #ifndef PRINTF_INT32_DEC_WIDTH 359 # define PRINTF_INT32_DEC_WIDTH "10" 361 #ifndef PRINTF_INT16_DEC_WIDTH 362 # define PRINTF_INT16_DEC_WIDTH "5" 364 #ifndef PRINTF_INT8_DEC_WIDTH 365 # define PRINTF_INT8_DEC_WIDTH "3" 374 #ifdef stdint_int64_defined 377 # define INTMAX_MAX INT64_MAX 378 # define INTMAX_MIN INT64_MIN 379 # define UINTMAX_MAX UINT64_MAX 380 # define UINTMAX_C(v) UINT64_C(v) 381 # define INTMAX_C(v) INT64_C(v) 382 # ifndef PRINTF_INTMAX_MODIFIER 383 # define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER 385 # ifndef PRINTF_INTMAX_HEX_WIDTH 386 # define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH 388 # ifndef PRINTF_INTMAX_DEC_WIDTH 389 # define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH 394 # define INTMAX_MAX INT32_MAX 395 # define UINTMAX_MAX UINT32_MAX 396 # define UINTMAX_C(v) UINT32_C(v) 397 # define INTMAX_C(v) INT32_C(v) 398 # ifndef PRINTF_INTMAX_MODIFIER 399 # define PRINTF_INTMAX_MODIFIER PRINTF_INT32_MODIFIER 401 # ifndef PRINTF_INTMAX_HEX_WIDTH 402 # define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT32_HEX_WIDTH 404 # ifndef PRINTF_INTMAX_DEC_WIDTH 405 # define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT32_DEC_WIDTH 416 #ifndef stdint_least_defined 423 # define PRINTF_LEAST32_MODIFIER PRINTF_INT32_MODIFIER 424 # define PRINTF_LEAST16_MODIFIER PRINTF_INT16_MODIFIER 425 # define UINT_LEAST8_MAX UINT8_MAX 426 # define INT_LEAST8_MAX INT8_MAX 427 # define UINT_LEAST16_MAX UINT16_MAX 428 # define INT_LEAST16_MAX INT16_MAX 429 # define UINT_LEAST32_MAX UINT32_MAX 430 # define INT_LEAST32_MAX INT32_MAX 431 # define INT_LEAST8_MIN INT8_MIN 432 # define INT_LEAST16_MIN INT16_MIN 433 # define INT_LEAST32_MIN INT32_MIN 434 # ifdef stdint_int64_defined 437 # define PRINTF_LEAST64_MODIFIER PRINTF_INT64_MODIFIER 438 # define UINT_LEAST64_MAX UINT64_MAX 439 # define INT_LEAST64_MAX INT64_MAX 440 # define INT_LEAST64_MIN INT64_MIN 443 #undef stdint_least_defined 462 #define UINT_FAST8_MAX UINT_LEAST8_MAX 463 #define INT_FAST8_MAX INT_LEAST8_MAX 464 #define UINT_FAST16_MAX UINT_LEAST16_MAX 465 #define INT_FAST16_MAX INT_LEAST16_MAX 466 #define UINT_FAST32_MAX UINT_LEAST32_MAX 467 #define INT_FAST32_MAX INT_LEAST32_MAX 468 #define INT_FAST8_MIN INT_LEAST8_MIN 469 #define INT_FAST16_MIN INT_LEAST16_MIN 470 #define INT_FAST32_MIN INT_LEAST32_MIN 471 #ifdef stdint_int64_defined 472 typedef int_least64_t int_fast64_t;
473 typedef uint_least64_t uint_fast64_t;
474 # define UINT_FAST64_MAX UINT_LEAST64_MAX 475 # define INT_FAST64_MAX INT_LEAST64_MAX 476 # define INT_FAST64_MIN INT_LEAST64_MIN 479 #undef stdint_int64_defined 486 #if defined(__WATCOMC__) || defined(_MSC_VER) || defined (__GNUC__) 492 # define WCHAR_MAX ((wchar_t)-1) 501 #if defined (_MSC_VER) && defined (_UINTPTR_T_DEFINED) 502 # define STDINT_H_UINTPTR_T_DEFINED 505 #ifndef STDINT_H_UINTPTR_T_DEFINED 506 # if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (_WIN64) 507 # define stdint_intptr_bits 64 508 # elif defined (__WATCOMC__) || defined (__TURBOC__) 509 # if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__) 510 # define stdint_intptr_bits 16 512 # define stdint_intptr_bits 32 514 # elif defined (__i386__) || defined (_WIN32) || defined (WIN32) 515 # define stdint_intptr_bits 32 516 # elif defined (__INTEL_COMPILER) 520 # ifdef stdint_intptr_bits 521 # define stdint_intptr_glue3_i(a,b,c) a##b##c 522 # define stdint_intptr_glue3(a,b,c) stdint_intptr_glue3_i(a,b,c) 523 # ifndef PRINTF_INTPTR_MODIFIER 524 # define PRINTF_INTPTR_MODIFIER stdint_intptr_glue3(PRINTF_INT,stdint_intptr_bits,_MODIFIER) 527 # define PTRDIFF_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX) 530 # define PTRDIFF_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN) 533 # define UINTPTR_MAX stdint_intptr_glue3(UINT,stdint_intptr_bits,_MAX) 536 # define INTPTR_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX) 539 # define INTPTR_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN) 542 # define INTPTR_C(x) stdint_intptr_glue3(INT,stdint_intptr_bits,_C)(x) 545 # define UINTPTR_C(x) stdint_intptr_glue3(UINT,stdint_intptr_bits,_C)(x) 554 # define STDINT_H_UINTPTR_T_DEFINED 561 #ifndef SIG_ATOMIC_MAX 562 # define SIG_ATOMIC_MAX ((((sig_atomic_t) 1) << (sizeof (sig_atomic_t)*CHAR_BIT-1)) - 1)
#define stdint_intptr_bits
unsigned __int16 uint16_t
int_least32_t int_fast32_t
uint_least32_t uint_fast32_t
uint_least16_t uint_fast16_t
unsigned __int64 uint64_t
int_least16_t int_fast16_t
#define stdint_intptr_glue3(a, b, c)
uint_least8_t uint_fast8_t
unsigned __int32 uint32_t