blob: b393cc10e0c736d27d55a6231916ef6cb4f30f91 [file] [log] [blame]
Eric Biederman8ca8d762003-04-22 19:02:15 +00001#ifndef I386_STDINT_H
2#define I386_STDINT_H
3
Stefan Reinauer52fc6b12009-10-24 13:06:04 +00004#if defined(__GNUC__)
Eric Biederman52685572003-05-19 19:16:21 +00005#define __HAVE_LONG_LONG__ 1
6#else
7#define __HAVE_LONG_LONG__ 0
8#endif
9
Eric Biederman8ca8d762003-04-22 19:02:15 +000010/* Exact integral types */
11typedef unsigned char uint8_t;
Stefan Reinauer14e22772010-04-27 06:56:47 +000012typedef signed char int8_t;
Eric Biederman8ca8d762003-04-22 19:02:15 +000013
14typedef unsigned short uint16_t;
15typedef signed short int16_t;
16
17typedef unsigned int uint32_t;
18typedef signed int int32_t;
19
Eric Biederman52685572003-05-19 19:16:21 +000020#if __HAVE_LONG_LONG__
Eric Biederman8ca8d762003-04-22 19:02:15 +000021typedef unsigned long long uint64_t;
22typedef signed long long int64_t;
Eric Biederman52685572003-05-19 19:16:21 +000023#endif
Eric Biederman8ca8d762003-04-22 19:02:15 +000024
25/* Small types */
26typedef unsigned char uint_least8_t;
Stefan Reinauer14e22772010-04-27 06:56:47 +000027typedef signed char int_least8_t;
Eric Biederman8ca8d762003-04-22 19:02:15 +000028
29typedef unsigned short uint_least16_t;
30typedef signed short int_least16_t;
31
32typedef unsigned int uint_least32_t;
33typedef signed int int_least32_t;
34
Eric Biederman52685572003-05-19 19:16:21 +000035#if __HAVE_LONG_LONG__
Eric Biederman8ca8d762003-04-22 19:02:15 +000036typedef unsigned long long uint_least64_t;
37typedef signed long long int_least64_t;
Eric Biederman52685572003-05-19 19:16:21 +000038#endif
Eric Biederman8ca8d762003-04-22 19:02:15 +000039
40/* Fast Types */
41typedef unsigned char uint_fast8_t;
Stefan Reinauer14e22772010-04-27 06:56:47 +000042typedef signed char int_fast8_t;
Eric Biederman8ca8d762003-04-22 19:02:15 +000043
44typedef unsigned int uint_fast16_t;
45typedef signed int int_fast16_t;
46
47typedef unsigned int uint_fast32_t;
48typedef signed int int_fast32_t;
49
Eric Biederman52685572003-05-19 19:16:21 +000050#if __HAVE_LONG_LONG__
Eric Biederman8ca8d762003-04-22 19:02:15 +000051typedef unsigned long long uint_fast64_t;
52typedef signed long long int_fast64_t;
Stefan Reinauer14e22772010-04-27 06:56:47 +000053#endif
Eric Biederman8ca8d762003-04-22 19:02:15 +000054
55/* Types for `void *' pointers. */
56typedef int intptr_t;
57typedef unsigned int uintptr_t;
58
59/* Largest integral types */
Eric Biederman52685572003-05-19 19:16:21 +000060#if __HAVE_LONG_LONG__
Eric Biederman8ca8d762003-04-22 19:02:15 +000061typedef long long int intmax_t;
62typedef unsigned long long uintmax_t;
Eric Biederman52685572003-05-19 19:16:21 +000063#else
64typedef long int intmax_t;
65typedef unsigned long int uintmax_t;
66#endif
67
Yinghai Lu21332b82007-04-06 19:49:05 +000068typedef uint8_t u8;
69typedef uint16_t u16;
70typedef uint32_t u32;
Stefan Reinauer36c83402009-03-01 10:16:01 +000071#if __HAVE_LONG_LONG__
72typedef uint64_t u64;
73#endif
Yinghai Lu21332b82007-04-06 19:49:05 +000074
Stefan Reinauer36c83402009-03-01 10:16:01 +000075#undef __HAVE_LONG_LONG__
Eric Biederman8ca8d762003-04-22 19:02:15 +000076
77#endif /* I386_STDINT_H */