Warning, file /include/assimp/Compiler/pstdint.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191 #include <stddef.h>
0192 #include <limits.h>
0193 #include <signal.h>
0194
0195
0196
0197
0198
0199
0200 #if ((defined(__SUNPRO_C) && __SUNPRO_C >= 0x570) || (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (__GNUC__ > 3 || defined(_STDINT_H) || defined(_STDINT_H_) || defined (__UINT_FAST64_TYPE__)) )) && !defined (_PSTDINT_H_INCLUDED)
0201 #include <stdint.h>
0202 #define _PSTDINT_H_INCLUDED
0203 # if defined(__GNUC__) && (defined(__x86_64__) || defined(__ppc64__)) && !(defined(__APPLE__) && defined(__MACH__))
0204 # ifndef PRINTF_INT64_MODIFIER
0205 # define PRINTF_INT64_MODIFIER "l"
0206 # endif
0207 # ifndef PRINTF_INT32_MODIFIER
0208 # define PRINTF_INT32_MODIFIER ""
0209 # endif
0210 # else
0211 # ifndef PRINTF_INT64_MODIFIER
0212 # define PRINTF_INT64_MODIFIER "ll"
0213 # endif
0214 # ifndef PRINTF_INT32_MODIFIER
0215 # if (UINT_MAX == UINT32_MAX)
0216 # define PRINTF_INT32_MODIFIER ""
0217 # else
0218 # define PRINTF_INT32_MODIFIER "l"
0219 # endif
0220 # endif
0221 # endif
0222 # ifndef PRINTF_INT16_MODIFIER
0223 # define PRINTF_INT16_MODIFIER "h"
0224 # endif
0225 # ifndef PRINTF_INTMAX_MODIFIER
0226 # define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
0227 # endif
0228 # ifndef PRINTF_INT64_HEX_WIDTH
0229 # define PRINTF_INT64_HEX_WIDTH "16"
0230 # endif
0231 # ifndef PRINTF_UINT64_HEX_WIDTH
0232 # define PRINTF_UINT64_HEX_WIDTH "16"
0233 # endif
0234 # ifndef PRINTF_INT32_HEX_WIDTH
0235 # define PRINTF_INT32_HEX_WIDTH "8"
0236 # endif
0237 # ifndef PRINTF_UINT32_HEX_WIDTH
0238 # define PRINTF_UINT32_HEX_WIDTH "8"
0239 # endif
0240 # ifndef PRINTF_INT16_HEX_WIDTH
0241 # define PRINTF_INT16_HEX_WIDTH "4"
0242 # endif
0243 # ifndef PRINTF_UINT16_HEX_WIDTH
0244 # define PRINTF_UINT16_HEX_WIDTH "4"
0245 # endif
0246 # ifndef PRINTF_INT8_HEX_WIDTH
0247 # define PRINTF_INT8_HEX_WIDTH "2"
0248 # endif
0249 # ifndef PRINTF_UINT8_HEX_WIDTH
0250 # define PRINTF_UINT8_HEX_WIDTH "2"
0251 # endif
0252 # ifndef PRINTF_INT64_DEC_WIDTH
0253 # define PRINTF_INT64_DEC_WIDTH "19"
0254 # endif
0255 # ifndef PRINTF_UINT64_DEC_WIDTH
0256 # define PRINTF_UINT64_DEC_WIDTH "20"
0257 # endif
0258 # ifndef PRINTF_INT32_DEC_WIDTH
0259 # define PRINTF_INT32_DEC_WIDTH "10"
0260 # endif
0261 # ifndef PRINTF_UINT32_DEC_WIDTH
0262 # define PRINTF_UINT32_DEC_WIDTH "10"
0263 # endif
0264 # ifndef PRINTF_INT16_DEC_WIDTH
0265 # define PRINTF_INT16_DEC_WIDTH "5"
0266 # endif
0267 # ifndef PRINTF_UINT16_DEC_WIDTH
0268 # define PRINTF_UINT16_DEC_WIDTH "5"
0269 # endif
0270 # ifndef PRINTF_INT8_DEC_WIDTH
0271 # define PRINTF_INT8_DEC_WIDTH "3"
0272 # endif
0273 # ifndef PRINTF_UINT8_DEC_WIDTH
0274 # define PRINTF_UINT8_DEC_WIDTH "3"
0275 # endif
0276 # ifndef PRINTF_INTMAX_HEX_WIDTH
0277 # define PRINTF_INTMAX_HEX_WIDTH PRINTF_UINT64_HEX_WIDTH
0278 # endif
0279 # ifndef PRINTF_UINTMAX_HEX_WIDTH
0280 # define PRINTF_UINTMAX_HEX_WIDTH PRINTF_UINT64_HEX_WIDTH
0281 # endif
0282 # ifndef PRINTF_INTMAX_DEC_WIDTH
0283 # define PRINTF_INTMAX_DEC_WIDTH PRINTF_UINT64_DEC_WIDTH
0284 # endif
0285 # ifndef PRINTF_UINTMAX_DEC_WIDTH
0286 # define PRINTF_UINTMAX_DEC_WIDTH PRINTF_UINT64_DEC_WIDTH
0287 # endif
0288
0289
0290
0291
0292
0293
0294 # if defined (__WATCOMC__) && __WATCOMC__ >= 1250
0295 # if !defined (INT64_C)
0296 # define INT64_C(x) (x + (INT64_MAX - INT64_MAX))
0297 # endif
0298 # if !defined (UINT64_C)
0299 # define UINT64_C(x) (x + (UINT64_MAX - UINT64_MAX))
0300 # endif
0301 # if !defined (INT32_C)
0302 # define INT32_C(x) (x + (INT32_MAX - INT32_MAX))
0303 # endif
0304 # if !defined (UINT32_C)
0305 # define UINT32_C(x) (x + (UINT32_MAX - UINT32_MAX))
0306 # endif
0307 # if !defined (INT16_C)
0308 # define INT16_C(x) (x)
0309 # endif
0310 # if !defined (UINT16_C)
0311 # define UINT16_C(x) (x)
0312 # endif
0313 # if !defined (INT8_C)
0314 # define INT8_C(x) (x)
0315 # endif
0316 # if !defined (UINT8_C)
0317 # define UINT8_C(x) (x)
0318 # endif
0319 # if !defined (UINT64_MAX)
0320 # define UINT64_MAX 18446744073709551615ULL
0321 # endif
0322 # if !defined (INT64_MAX)
0323 # define INT64_MAX 9223372036854775807LL
0324 # endif
0325 # if !defined (UINT32_MAX)
0326 # define UINT32_MAX 4294967295UL
0327 # endif
0328 # if !defined (INT32_MAX)
0329 # define INT32_MAX 2147483647L
0330 # endif
0331 # if !defined (INTMAX_MAX)
0332 # define INTMAX_MAX INT64_MAX
0333 # endif
0334 # if !defined (INTMAX_MIN)
0335 # define INTMAX_MIN INT64_MIN
0336 # endif
0337 # endif
0338 #endif
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349 #if (defined(__SUNPRO_C) && __SUNPRO_C >= 0x420) && !defined(_PSTDINT_H_INCLUDED)
0350 #include <sys/inttypes.h>
0351 #define _PSTDINT_H_INCLUDED
0352 #endif
0353
0354 #ifndef _PSTDINT_H_INCLUDED
0355 #define _PSTDINT_H_INCLUDED
0356
0357 #ifndef SIZE_MAX
0358 # define SIZE_MAX (~(size_t)0)
0359 #endif
0360
0361
0362
0363
0364
0365
0366
0367 #ifndef UINT8_MAX
0368 # define UINT8_MAX 0xff
0369 #endif
0370 #if !defined(uint8_t) && !defined(_UINT8_T) && !defined(vxWorks)
0371 # if (UCHAR_MAX == UINT8_MAX) || defined (S_SPLINT_S)
0372 typedef unsigned char uint8_t;
0373 # define UINT8_C(v) ((uint8_t) v)
0374 # else
0375 # error "Platform not supported"
0376 # endif
0377 #endif
0378
0379 #ifndef INT8_MAX
0380 # define INT8_MAX 0x7f
0381 #endif
0382 #ifndef INT8_MIN
0383 # define INT8_MIN INT8_C(0x80)
0384 #endif
0385 #if !defined(int8_t) && !defined(_INT8_T) && !defined(vxWorks)
0386 # if (SCHAR_MAX == INT8_MAX) || defined (S_SPLINT_S)
0387 typedef signed char int8_t;
0388 # define INT8_C(v) ((int8_t) v)
0389 # else
0390 # error "Platform not supported"
0391 # endif
0392 #endif
0393
0394 #ifndef UINT16_MAX
0395 # define UINT16_MAX 0xffff
0396 #endif
0397 #if !defined(uint16_t) && !defined(_UINT16_T) && !defined(vxWorks)
0398 #if (UINT_MAX == UINT16_MAX) || defined (S_SPLINT_S)
0399 typedef unsigned int uint16_t;
0400 # ifndef PRINTF_INT16_MODIFIER
0401 # define PRINTF_INT16_MODIFIER ""
0402 # endif
0403 # define UINT16_C(v) ((uint16_t) (v))
0404 #elif (USHRT_MAX == UINT16_MAX)
0405 typedef unsigned short uint16_t;
0406 # define UINT16_C(v) ((uint16_t) (v))
0407 # ifndef PRINTF_INT16_MODIFIER
0408 # define PRINTF_INT16_MODIFIER "h"
0409 # endif
0410 #else
0411 #error "Platform not supported"
0412 #endif
0413 #endif
0414
0415 #ifndef INT16_MAX
0416 # define INT16_MAX 0x7fff
0417 #endif
0418 #ifndef INT16_MIN
0419 # define INT16_MIN INT16_C(0x8000)
0420 #endif
0421 #if !defined(int16_t) && !defined(_INT16_T) && !defined(vxWorks)
0422 #if (INT_MAX == INT16_MAX) || defined (S_SPLINT_S)
0423 typedef signed int int16_t;
0424 # define INT16_C(v) ((int16_t) (v))
0425 # ifndef PRINTF_INT16_MODIFIER
0426 # define PRINTF_INT16_MODIFIER ""
0427 # endif
0428 #elif (SHRT_MAX == INT16_MAX)
0429 typedef signed short int16_t;
0430 # define INT16_C(v) ((int16_t) (v))
0431 # ifndef PRINTF_INT16_MODIFIER
0432 # define PRINTF_INT16_MODIFIER "h"
0433 # endif
0434 #else
0435 #error "Platform not supported"
0436 #endif
0437 #endif
0438
0439 #ifndef UINT32_MAX
0440 # define UINT32_MAX (0xffffffffUL)
0441 #endif
0442 #if !defined(uint32_t) && !defined(_UINT32_T) && !defined(vxWorks)
0443 #if (ULONG_MAX == UINT32_MAX) || defined (S_SPLINT_S)
0444 typedef unsigned long uint32_t;
0445 # define UINT32_C(v) v ## UL
0446 # ifndef PRINTF_INT32_MODIFIER
0447 # define PRINTF_INT32_MODIFIER "l"
0448 # endif
0449 #elif (UINT_MAX == UINT32_MAX)
0450 typedef unsigned int uint32_t;
0451 # ifndef PRINTF_INT32_MODIFIER
0452 # define PRINTF_INT32_MODIFIER ""
0453 # endif
0454 # define UINT32_C(v) v ## U
0455 #elif (USHRT_MAX == UINT32_MAX)
0456 typedef unsigned short uint32_t;
0457 # define UINT32_C(v) ((unsigned short) (v))
0458 # ifndef PRINTF_INT32_MODIFIER
0459 # define PRINTF_INT32_MODIFIER ""
0460 # endif
0461 #else
0462 #error "Platform not supported"
0463 #endif
0464 #endif
0465
0466 #ifndef INT32_MAX
0467 # define INT32_MAX (0x7fffffffL)
0468 #endif
0469 #ifndef INT32_MIN
0470 # define INT32_MIN INT32_C(0x80000000)
0471 #endif
0472 #if !defined(int32_t) && !defined(_INT32_T) && !defined(vxWorks)
0473 #if (LONG_MAX == INT32_MAX) || defined (S_SPLINT_S)
0474 typedef signed long int32_t;
0475 # define INT32_C(v) v ## L
0476 # ifndef PRINTF_INT32_MODIFIER
0477 # define PRINTF_INT32_MODIFIER "l"
0478 # endif
0479 #elif (INT_MAX == INT32_MAX)
0480 typedef signed int int32_t;
0481 # define INT32_C(v) v
0482 # ifndef PRINTF_INT32_MODIFIER
0483 # define PRINTF_INT32_MODIFIER ""
0484 # endif
0485 #elif (SHRT_MAX == INT32_MAX)
0486 typedef signed short int32_t;
0487 # define INT32_C(v) ((short) (v))
0488 # ifndef PRINTF_INT32_MODIFIER
0489 # define PRINTF_INT32_MODIFIER ""
0490 # endif
0491 #else
0492 #error "Platform not supported"
0493 #endif
0494 #endif
0495
0496
0497
0498
0499
0500
0501
0502
0503 #undef stdint_int64_defined
0504 #if (defined(__STDC__) && defined(__STDC_VERSION__)) || defined (S_SPLINT_S)
0505 # if (__STDC__ && __STDC_VERSION__ >= 199901L) || defined (S_SPLINT_S)
0506 # define stdint_int64_defined
0507 typedef long long int64_t;
0508 typedef unsigned long long uint64_t;
0509 # define UINT64_C(v) v ## ULL
0510 # define INT64_C(v) v ## LL
0511 # ifndef PRINTF_INT64_MODIFIER
0512 # define PRINTF_INT64_MODIFIER "ll"
0513 # endif
0514 # endif
0515 #endif
0516
0517 #if !defined (stdint_int64_defined)
0518 # if defined(__GNUC__) && !defined(vxWorks)
0519 # define stdint_int64_defined
0520 __extension__ typedef long long int64_t;
0521 __extension__ typedef unsigned long long uint64_t;
0522 # define UINT64_C(v) v ## ULL
0523 # define INT64_C(v) v ## LL
0524 # ifndef PRINTF_INT64_MODIFIER
0525 # define PRINTF_INT64_MODIFIER "ll"
0526 # endif
0527 # elif defined(__MWERKS__) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || defined (__APPLE_CC__) || defined (_LONG_LONG) || defined (_CRAYC) || defined (S_SPLINT_S)
0528 # define stdint_int64_defined
0529 typedef long long int64_t;
0530 typedef unsigned long long uint64_t;
0531 # define UINT64_C(v) v ## ULL
0532 # define INT64_C(v) v ## LL
0533 # ifndef PRINTF_INT64_MODIFIER
0534 # define PRINTF_INT64_MODIFIER "ll"
0535 # endif
0536 # elif (defined(__WATCOMC__) && defined(__WATCOM_INT64__)) || (defined(_MSC_VER) && _INTEGRAL_MAX_BITS >= 64) || (defined (__BORLANDC__) && __BORLANDC__ > 0x460) || defined (__alpha) || defined (__DECC)
0537 # define stdint_int64_defined
0538 typedef __int64 int64_t;
0539 typedef unsigned __int64 uint64_t;
0540 # define UINT64_C(v) v ## UI64
0541 # define INT64_C(v) v ## I64
0542 # ifndef PRINTF_INT64_MODIFIER
0543 # define PRINTF_INT64_MODIFIER "I64"
0544 # endif
0545 # endif
0546 #endif
0547
0548 #if !defined (LONG_LONG_MAX) && defined (INT64_C)
0549 # define LONG_LONG_MAX INT64_C (9223372036854775807)
0550 #endif
0551 #ifndef ULONG_LONG_MAX
0552 # define ULONG_LONG_MAX UINT64_C (18446744073709551615)
0553 #endif
0554
0555 #if !defined (INT64_MAX) && defined (INT64_C)
0556 # define INT64_MAX INT64_C (9223372036854775807)
0557 #endif
0558 #if !defined (INT64_MIN) && defined (INT64_C)
0559 # define INT64_MIN INT64_C (-9223372036854775808)
0560 #endif
0561 #if !defined (UINT64_MAX) && defined (INT64_C)
0562 # define UINT64_MAX UINT64_C (18446744073709551615)
0563 #endif
0564
0565
0566
0567
0568
0569 #ifndef PRINTF_INT64_HEX_WIDTH
0570 # define PRINTF_INT64_HEX_WIDTH "16"
0571 #endif
0572 #ifndef PRINTF_INT32_HEX_WIDTH
0573 # define PRINTF_INT32_HEX_WIDTH "8"
0574 #endif
0575 #ifndef PRINTF_INT16_HEX_WIDTH
0576 # define PRINTF_INT16_HEX_WIDTH "4"
0577 #endif
0578 #ifndef PRINTF_INT8_HEX_WIDTH
0579 # define PRINTF_INT8_HEX_WIDTH "2"
0580 #endif
0581 #ifndef PRINTF_INT64_DEC_WIDTH
0582 # define PRINTF_INT64_DEC_WIDTH "19"
0583 #endif
0584 #ifndef PRINTF_INT32_DEC_WIDTH
0585 # define PRINTF_INT32_DEC_WIDTH "10"
0586 #endif
0587 #ifndef PRINTF_INT16_DEC_WIDTH
0588 # define PRINTF_INT16_DEC_WIDTH "5"
0589 #endif
0590 #ifndef PRINTF_INT8_DEC_WIDTH
0591 # define PRINTF_INT8_DEC_WIDTH "3"
0592 #endif
0593 #ifndef PRINTF_UINT64_DEC_WIDTH
0594 # define PRINTF_UINT64_DEC_WIDTH "20"
0595 #endif
0596 #ifndef PRINTF_UINT32_DEC_WIDTH
0597 # define PRINTF_UINT32_DEC_WIDTH "10"
0598 #endif
0599 #ifndef PRINTF_UINT16_DEC_WIDTH
0600 # define PRINTF_UINT16_DEC_WIDTH "5"
0601 #endif
0602 #ifndef PRINTF_UINT8_DEC_WIDTH
0603 # define PRINTF_UINT8_DEC_WIDTH "3"
0604 #endif
0605
0606
0607
0608
0609
0610
0611
0612 #ifdef stdint_int64_defined
0613 typedef int64_t intmax_t;
0614 typedef uint64_t uintmax_t;
0615 # define INTMAX_MAX INT64_MAX
0616 # define INTMAX_MIN INT64_MIN
0617 # define UINTMAX_MAX UINT64_MAX
0618 # define UINTMAX_C(v) UINT64_C(v)
0619 # define INTMAX_C(v) INT64_C(v)
0620 # ifndef PRINTF_INTMAX_MODIFIER
0621 # define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
0622 # endif
0623 # ifndef PRINTF_INTMAX_HEX_WIDTH
0624 # define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
0625 # endif
0626 # ifndef PRINTF_INTMAX_DEC_WIDTH
0627 # define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
0628 # endif
0629 #else
0630 typedef int32_t intmax_t;
0631 typedef uint32_t uintmax_t;
0632 # define INTMAX_MAX INT32_MAX
0633 # define UINTMAX_MAX UINT32_MAX
0634 # define UINTMAX_C(v) UINT32_C(v)
0635 # define INTMAX_C(v) INT32_C(v)
0636 # ifndef PRINTF_INTMAX_MODIFIER
0637 # define PRINTF_INTMAX_MODIFIER PRINTF_INT32_MODIFIER
0638 # endif
0639 # ifndef PRINTF_INTMAX_HEX_WIDTH
0640 # define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT32_HEX_WIDTH
0641 # endif
0642 # ifndef PRINTF_INTMAX_DEC_WIDTH
0643 # define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT32_DEC_WIDTH
0644 # endif
0645 #endif
0646
0647
0648
0649
0650
0651
0652
0653
0654 #ifndef stdint_least_defined
0655 typedef int8_t int_least8_t;
0656 typedef uint8_t uint_least8_t;
0657 typedef int16_t int_least16_t;
0658 typedef uint16_t uint_least16_t;
0659 typedef int32_t int_least32_t;
0660 typedef uint32_t uint_least32_t;
0661 # define PRINTF_LEAST32_MODIFIER PRINTF_INT32_MODIFIER
0662 # define PRINTF_LEAST16_MODIFIER PRINTF_INT16_MODIFIER
0663 # define UINT_LEAST8_MAX UINT8_MAX
0664 # define INT_LEAST8_MAX INT8_MAX
0665 # define UINT_LEAST16_MAX UINT16_MAX
0666 # define INT_LEAST16_MAX INT16_MAX
0667 # define UINT_LEAST32_MAX UINT32_MAX
0668 # define INT_LEAST32_MAX INT32_MAX
0669 # define INT_LEAST8_MIN INT8_MIN
0670 # define INT_LEAST16_MIN INT16_MIN
0671 # define INT_LEAST32_MIN INT32_MIN
0672 # ifdef stdint_int64_defined
0673 typedef int64_t int_least64_t;
0674 typedef uint64_t uint_least64_t;
0675 # define PRINTF_LEAST64_MODIFIER PRINTF_INT64_MODIFIER
0676 # define UINT_LEAST64_MAX UINT64_MAX
0677 # define INT_LEAST64_MAX INT64_MAX
0678 # define INT_LEAST64_MIN INT64_MIN
0679 # endif
0680 #endif
0681 #undef stdint_least_defined
0682
0683
0684
0685
0686
0687
0688
0689
0690
0691
0692
0693
0694 typedef int_least8_t int_fast8_t;
0695 typedef uint_least8_t uint_fast8_t;
0696 typedef int_least16_t int_fast16_t;
0697 typedef uint_least16_t uint_fast16_t;
0698 typedef int_least32_t int_fast32_t;
0699 typedef uint_least32_t uint_fast32_t;
0700 #define UINT_FAST8_MAX UINT_LEAST8_MAX
0701 #define INT_FAST8_MAX INT_LEAST8_MAX
0702 #define UINT_FAST16_MAX UINT_LEAST16_MAX
0703 #define INT_FAST16_MAX INT_LEAST16_MAX
0704 #define UINT_FAST32_MAX UINT_LEAST32_MAX
0705 #define INT_FAST32_MAX INT_LEAST32_MAX
0706 #define INT_FAST8_MIN INT_LEAST8_MIN
0707 #define INT_FAST16_MIN INT_LEAST16_MIN
0708 #define INT_FAST32_MIN INT_LEAST32_MIN
0709 #ifdef stdint_int64_defined
0710 typedef int_least64_t int_fast64_t;
0711 typedef uint_least64_t uint_fast64_t;
0712 # define UINT_FAST64_MAX UINT_LEAST64_MAX
0713 # define INT_FAST64_MAX INT_LEAST64_MAX
0714 # define INT_FAST64_MIN INT_LEAST64_MIN
0715 #endif
0716
0717 #undef stdint_int64_defined
0718
0719
0720
0721
0722
0723
0724 #if defined(__WATCOMC__) || defined(_MSC_VER) || defined (__GNUC__) && !defined(vxWorks)
0725 # include <wchar.h>
0726 # ifndef WCHAR_MIN
0727 # define WCHAR_MIN 0
0728 # endif
0729 # ifndef WCHAR_MAX
0730 # define WCHAR_MAX ((wchar_t)-1)
0731 # endif
0732 #endif
0733
0734
0735
0736
0737
0738
0739 #if (defined (_MSC_VER) && defined (_UINTPTR_T_DEFINED)) || defined (_UINTPTR_T)
0740 # define STDINT_H_UINTPTR_T_DEFINED
0741 #endif
0742
0743 #ifndef STDINT_H_UINTPTR_T_DEFINED
0744 # if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (_WIN64) || defined (__ppc64__)
0745 # define stdint_intptr_bits 64
0746 # elif defined (__WATCOMC__) || defined (__TURBOC__)
0747 # if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
0748 # define stdint_intptr_bits 16
0749 # else
0750 # define stdint_intptr_bits 32
0751 # endif
0752 # elif defined (__i386__) || defined (_WIN32) || defined (WIN32) || defined (__ppc64__)
0753 # define stdint_intptr_bits 32
0754 # elif defined (__INTEL_COMPILER)
0755
0756 # else
0757
0758 # endif
0759
0760 # ifdef stdint_intptr_bits
0761 # define stdint_intptr_glue3_i(a,b,c) a##b##c
0762 # define stdint_intptr_glue3(a,b,c) stdint_intptr_glue3_i(a,b,c)
0763 # ifndef PRINTF_INTPTR_MODIFIER
0764 # define PRINTF_INTPTR_MODIFIER stdint_intptr_glue3(PRINTF_INT,stdint_intptr_bits,_MODIFIER)
0765 # endif
0766 # ifndef PTRDIFF_MAX
0767 # define PTRDIFF_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
0768 # endif
0769 # ifndef PTRDIFF_MIN
0770 # define PTRDIFF_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
0771 # endif
0772 # ifndef UINTPTR_MAX
0773 # define UINTPTR_MAX stdint_intptr_glue3(UINT,stdint_intptr_bits,_MAX)
0774 # endif
0775 # ifndef INTPTR_MAX
0776 # define INTPTR_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
0777 # endif
0778 # ifndef INTPTR_MIN
0779 # define INTPTR_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
0780 # endif
0781 # ifndef INTPTR_C
0782 # define INTPTR_C(x) stdint_intptr_glue3(INT,stdint_intptr_bits,_C)(x)
0783 # endif
0784 # ifndef UINTPTR_C
0785 # define UINTPTR_C(x) stdint_intptr_glue3(UINT,stdint_intptr_bits,_C)(x)
0786 # endif
0787 typedef stdint_intptr_glue3(uint,stdint_intptr_bits,_t) uintptr_t;
0788 typedef stdint_intptr_glue3( int,stdint_intptr_bits,_t) intptr_t;
0789 # else
0790
0791
0792 typedef ptrdiff_t intptr_t;
0793 # endif
0794 # define STDINT_H_UINTPTR_T_DEFINED
0795 #endif
0796
0797
0798
0799
0800
0801 #ifndef SIG_ATOMIC_MAX
0802 # define SIG_ATOMIC_MAX ((((sig_atomic_t) 1) << (sizeof (sig_atomic_t)*CHAR_BIT-1)) - 1)
0803 #endif
0804
0805 #endif
0806
0807 #if defined (__TEST_PSTDINT_FOR_CORRECTNESS)
0808
0809
0810
0811
0812
0813
0814 #include <stdlib.h>
0815 #include <stdio.h>
0816 #include <string.h>
0817
0818 #define glue3_aux(x,y,z) x ## y ## z
0819 #define glue3(x,y,z) glue3_aux(x,y,z)
0820
0821 #define DECLU(bits) glue3(uint,bits,_t) glue3(u,bits,) = glue3(UINT,bits,_C) (0);
0822 #define DECLI(bits) glue3(int,bits,_t) glue3(i,bits,) = glue3(INT,bits,_C) (0);
0823
0824 #define DECL(us,bits) glue3(DECL,us,) (bits)
0825
0826 #define TESTUMAX(bits) glue3(u,bits,) = ~glue3(u,bits,); if (glue3(UINT,bits,_MAX) != glue3(u,bits,)) printf ("Something wrong with UINT%d_MAX\n", bits)
0827
0828 #define REPORTERROR(msg) { err_n++; if (err_first <= 0) err_first = __LINE__; printf msg; }
0829
0830 int main () {
0831 int err_n = 0;
0832 int err_first = 0;
0833 DECL(I,8)
0834 DECL(U,8)
0835 DECL(I,16)
0836 DECL(U,16)
0837 DECL(I,32)
0838 DECL(U,32)
0839 #ifdef INT64_MAX
0840 DECL(I,64)
0841 DECL(U,64)
0842 #endif
0843 intmax_t imax = INTMAX_C(0);
0844 uintmax_t umax = UINTMAX_C(0);
0845 char str0[256], str1[256];
0846
0847 sprintf (str0, "%" PRINTF_INT32_MODIFIER "d", INT32_C(2147483647));
0848 if (0 != strcmp (str0, "2147483647")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str0));
0849 if (atoi(PRINTF_INT32_DEC_WIDTH) != (int) strlen(str0)) REPORTERROR (("Something wrong with PRINTF_INT32_DEC_WIDTH : %s\n", PRINTF_INT32_DEC_WIDTH));
0850 sprintf (str0, "%" PRINTF_INT32_MODIFIER "u", UINT32_C(4294967295));
0851 if (0 != strcmp (str0, "4294967295")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str0));
0852 if (atoi(PRINTF_UINT32_DEC_WIDTH) != (int) strlen(str0)) REPORTERROR (("Something wrong with PRINTF_UINT32_DEC_WIDTH : %s\n", PRINTF_UINT32_DEC_WIDTH));
0853 #ifdef INT64_MAX
0854 sprintf (str1, "%" PRINTF_INT64_MODIFIER "d", INT64_C(9223372036854775807));
0855 if (0 != strcmp (str1, "9223372036854775807")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str1));
0856 if (atoi(PRINTF_INT64_DEC_WIDTH) != (int) strlen(str1)) REPORTERROR (("Something wrong with PRINTF_INT64_DEC_WIDTH : %s, %d\n", PRINTF_INT64_DEC_WIDTH, (int) strlen(str1)));
0857 sprintf (str1, "%" PRINTF_INT64_MODIFIER "u", UINT64_C(18446744073709550591));
0858 if (0 != strcmp (str1, "18446744073709550591")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str1));
0859 if (atoi(PRINTF_UINT64_DEC_WIDTH) != (int) strlen(str1)) REPORTERROR (("Something wrong with PRINTF_UINT64_DEC_WIDTH : %s, %d\n", PRINTF_UINT64_DEC_WIDTH, (int) strlen(str1)));
0860 #endif
0861
0862 sprintf (str0, "%d %x\n", 0, ~0);
0863
0864 sprintf (str1, "%d %x\n", i8, ~0);
0865 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i8 : %s\n", str1));
0866 sprintf (str1, "%u %x\n", u8, ~0);
0867 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with u8 : %s\n", str1));
0868 sprintf (str1, "%d %x\n", i16, ~0);
0869 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i16 : %s\n", str1));
0870 sprintf (str1, "%u %x\n", u16, ~0);
0871 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with u16 : %s\n", str1));
0872 sprintf (str1, "%" PRINTF_INT32_MODIFIER "d %x\n", i32, ~0);
0873 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i32 : %s\n", str1));
0874 sprintf (str1, "%" PRINTF_INT32_MODIFIER "u %x\n", u32, ~0);
0875 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with u32 : %s\n", str1));
0876 #ifdef INT64_MAX
0877 sprintf (str1, "%" PRINTF_INT64_MODIFIER "d %x\n", i64, ~0);
0878 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i64 : %s\n", str1));
0879 #endif
0880 sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "d %x\n", imax, ~0);
0881 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with imax : %s\n", str1));
0882 sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "u %x\n", umax, ~0);
0883 if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with umax : %s\n", str1));
0884
0885 TESTUMAX(8);
0886 TESTUMAX(16);
0887 TESTUMAX(32);
0888 #ifdef INT64_MAX
0889 TESTUMAX(64);
0890 #endif
0891
0892 #define STR(v) #v
0893 #define Q(v) printf ("sizeof " STR(v) " = %u\n", (unsigned) sizeof (v));
0894 if (err_n) {
0895 printf ("pstdint.h is not correct. Please use sizes below to correct it:\n");
0896 }
0897
0898 Q(int)
0899 Q(unsigned)
0900 Q(long int)
0901 Q(short int)
0902 Q(int8_t)
0903 Q(int16_t)
0904 Q(int32_t)
0905 #ifdef INT64_MAX
0906 Q(int64_t)
0907 #endif
0908
0909 return EXIT_SUCCESS;
0910 }
0911
0912 #endif