]> git.saurik.com Git - apt.git/blob - buildlib/inttypes.h.in
* apt-pkg/deb/dpkgpm.cc:
[apt.git] / buildlib / inttypes.h.in
1 /* This is an ISO C 9X header file. We omit this copy to the include
2 directory if the local platform does not have inttypes.h, it contains
3 [u]int[8,16,32]_t fixed width types */
4
5 #include <config.h>
6
7 #undef int32_t
8 #undef uint32_t
9 #undef int16_t
10 #undef uint16_t
11 #undef int8_t
12 #undef uint8_t
13
14 /* Generate the fixed bit size types */
15 #if SIZEOF_INT == 4
16 typedef int int32_t;
17 typedef unsigned int uint32_t;
18 #else
19 # if SIZEOF_LONG == 4
20 typedef long int32_t;
21 typedef unsigned long uint32_t;
22 # else
23 # if SIZEOF_SHORT == 4
24 typedef short int32_t;
25 typedef unsigned short uint32_t;
26 # else
27 # error Must have a form of 32-bit integer
28 # endif
29 # endif
30 #endif
31
32 #if SIZEOF_INT == 2
33 typedef int int16_t;
34 typedef unsigned int uint16_t;
35 #else
36 # if SIZEOF_LONG == 2
37 typedef long int16_t;
38 typedef unsigned long uint16_t;
39 # else
40 # if SIZEOF_SHORT == 2
41 typedef short int16_t;
42 typedef unsigned short uint16_t;
43 # else
44 # error Must have a form of 16-bit integer
45 # endif
46 # endif
47 #endif
48
49 typedef signed char int8_t;
50 typedef unsigned char uint8_t;