Changeset 829 in vbox
- Timestamp:
- Feb 12, 2007 10:38:01 AM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nocrt/limits.h
r828 r829 1 1 /** @file 2 * InnoTek Portable Runtime / No-CRT - Our own setjmpheader.2 * InnoTek Portable Runtime / No-CRT - Our own limits header. 3 3 */ 4 4 … … 19 19 */ 20 20 21 #ifndef __ setjmp_h__22 #define __ setjmp_h__21 #ifndef __limits_h__ 22 #define __limits_h__ 23 23 24 24 #include <iprt/types.h> 25 25 26 __BEGIN_DECLS 27 28 #ifdef __AMD64__ 29 typedef uint64_t RT_NOCRT(jmp_buf)[8]; 26 #define CHAR_BIT 8 27 #define SCHAR_MAX 0x7f 28 #define SCHAR_MIN (-0x7f - 1) 29 #define UCHAR_MAX 0xff 30 #if 1 /* ASSUMES: signed char */ 31 # define CHAR_MAX SCHAR_MAX 32 # define CHAR_MIN SCHAR_MIN 30 33 #else 31 typedef uint32_t RT_NOCRT(jmp_buf)[6+2]; 34 # define CHAR_MAX UCHAR_MAX 35 # define CHAR_MIN 0 32 36 #endif 33 37 34 extern int RT_NOCRT(setjmp)(RT_NOCRT(jmp_buf)); 35 extern int RT_NOCRT(longjmp)(RT_NOCRT(jmp_buf), int); 38 #define WORD_BIT 16 39 #define USHRT_MAX 0xffff 40 #define SHRT_MAX 0x7fff 41 #define SHRT_MIN (-0x7fff - 1) 36 42 37 #ifndef RT_WITHOUT_NOCRT_WRAPPERS 38 # define jmp_buf RT_NOCRT(jmp_buf) 39 # define setjmp RT_NOCRT(setjmp) 40 # define longjmp RT_NOCRT(longjmp) 43 /* ASSUMES 32-bit int */ 44 #define UINT_MAX 0xffffffffU 45 #define INT_MAX 0x7fffffff 46 #define INT_MIN (-0x7fffffff - 1) 47 48 #if defined(__X86__) || defined(__WIN__) 49 # define LONG_BIT 32 50 # define ULONG_MAX 0xffffffffU 51 # define LONG_MAX 0x7fffffff 52 # define LONG_MIN (-0x7fffffff - 1) 53 #elif defined(__AMD64__) 54 # define LONG_BIT 64 55 # define ULONG_MAX UINT64_C(0xffffffffffffffff) 56 # define LONG_MAX INT64_C(0x7fffffffffffffff) 57 # define LONG_MIN (INT64_C(-0x7fffffffffffffff) - 1) 58 #else 59 # error "huh?" 41 60 #endif 42 61 43 __END_DECLS 62 #define LLONG_BIT 64 63 #define ULLONG_MAX UINT64_C(0xffffffffffffffff) 64 #define LLONG_MAX INT64_C(0x7fffffffffffffff) 65 #define LLONG_MIN (INT64_C(-0x7fffffffffffffff) - 1) 66 67 #if ARCH_BITS == 32 68 # define SIZE_T_MAX 0xffffffffU 69 # define SSIZE_MAX 0x7fffffff 70 #elif ARCH_BITS == 64 71 # define SIZE_T_MAX UINT64_C(0xffffffffffffffff) 72 # define SSIZE_MAX INT64_C(0x7fffffffffffffff) 73 #else 74 # error "huh?" 75 #endif 76 77 /*#define OFF_MAX __OFF_MAX 78 #define OFF_MIN __OFF_MIN*/ 44 79 45 80 #endif
Note:
See TracChangeset
for help on using the changeset viewer.