10#ifndef util_misc_scint_h
11#define util_misc_scint_h
21typedef int8_t sc_int8_t;
22typedef int_least8_t sc_int_least8_t;
23typedef int_fast8_t sc_int_fast8_t;
24typedef uint8_t sc_uint8_t;
25typedef uint_least8_t sc_uint_least8_t;
26typedef uint_fast8_t sc_uint_fast8_t;
28typedef int16_t sc_int16_t;
29typedef int_least16_t sc_int_least16_t;
30typedef int_fast16_t sc_int_fast16_t;
31typedef uint16_t sc_uint16_t;
32typedef uint_least16_t sc_uint_least16_t;
33typedef uint_fast16_t sc_uint_fast16_t;
35typedef int32_t sc_int32_t;
36typedef int_least32_t sc_int_least32_t;
37typedef int_fast32_t sc_int_fast32_t;
38typedef uint32_t sc_uint32_t;
39typedef uint_least32_t sc_uint_least32_t;
40typedef uint_fast32_t sc_uint_fast32_t;
42typedef intmax_t sc_intmax_t;
43typedef uintmax_t sc_uintmax_t;
44typedef int64_t sc_int64_t;
45typedef int_least64_t sc_int_least64_t;
46typedef int_fast64_t sc_int_fast64_t;
47typedef uint64_t sc_uint64_t;
48typedef uint_least64_t sc_uint_least64_t;
49typedef uint_fast64_t sc_uint_fast64_t;
71 typedef signed char sc_int8_t;
72 typedef signed char sc_int_least8_t;
73 typedef signed char sc_int_fast8_t;
74 typedef unsigned char sc_uint8_t;
75 typedef unsigned char sc_uint_least8_t;
76 typedef unsigned char sc_uint_fast8_t;
78# error defaults not correct; you must hand modify scint.h
83# if USHRT_MAX == 0xffff
84 typedef short sc_int16_t;
85 typedef short sc_int_least16_t;
86 typedef short sc_int_fast16_t;
87 typedef unsigned short sc_uint16_t;
88 typedef unsigned short sc_uint_least16_t;
89 typedef unsigned short sc_uint_fast16_t;
91# error defaults not correct; you must hand modify scint.h
96# if UINT_MAX == 0xffffffff
97 typedef int sc_int32_t;
98 typedef int sc_int_least32_t;
99 typedef int sc_int_fast32_t;
100 typedef unsigned int sc_uint32_t;
101 typedef unsigned int sc_uint_least32_t;
102 typedef unsigned int sc_uint_fast32_t;
103# elif ULONG_MAX == 0xffffffff
104 typedef long sc_int32_t;
105 typedef long sc_int_least32_t;
106 typedef long sc_int_fast32_t;
107 typedef unsigned long sc_uint32_t;
108 typedef unsigned long sc_uint_least32_t;
109 typedef unsigned long sc_uint_fast32_t;
111# error defaults not correct; you must hand modify scint.h
116#if defined(ULONGLONG_MAX) && !defined(ULLONG_MAX)
117# define ULLONG_MAX ULONGLONG_MAX
122# if ULLONG_MAX == (0xffffffffffffffffuLL)
123 typedef long long sc_intmax_t;
124 typedef unsigned long long sc_uintmax_t;
125 typedef long long sc_int64_t;
126 typedef long long sc_int_least64_t;
127 typedef long long sc_int_fast64_t;
128 typedef unsigned long long sc_uint64_t;
129 typedef unsigned long long sc_uint_least64_t;
130 typedef unsigned long long sc_uint_fast64_t;
132# error defaults not correct; you must hand modify scint.h
134# elif ULONG_MAX != 0xffffffff
136# if ULONG_MAX == 18446744073709551615
137 typedef long sc_intmax_t;
138 typedef unsigned long sc_uintmax_t;
139 typedef long sc_int64_t;
140 typedef long sc_int_least64_t;
141 typedef long sc_int_fast64_t;
142 typedef unsigned long sc_uint64_t;
143 typedef unsigned long sc_uint_least64_t;
144 typedef unsigned long sc_uint_fast64_t;
146# error defaults not correct; you must hand modify scint.h
149# error 64 bit integer types are required
150 typedef sc_int32_t sc_intmax_t;
151 typedef sc_uint32_t sc_uintmax_t;