]> git.saurik.com Git - apt.git/blame - buildlib/inttypes.h.in
* apt-pkg/depcache.cc:
[apt.git] / buildlib / inttypes.h.in
CommitLineData
021988ea
AL
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/* Generate the fixed bit size types */
8#if SIZEOF_INT == 4
9 typedef int int32_t;
10 typedef unsigned int uint32_t;
11#else
12# if SIZEOF_LONG == 4
13 typedef long int32_t;
14 typedef unsigned long uint32_t;
15# else
16# if SIZEOF_SHORT == 4
17 typedef short int32_t;
18 typedef unsigned short uint32_t;
19# else
20# error Must have a form of 32-bit integer
21# endif
22# endif
23#endif
24
25#if SIZEOF_INT == 2
26 typedef int int16_t;
27 typedef unsigned int uint16_t;
28#else
29# if SIZEOF_LONG == 2
30 typedef long int16_t;
31 typedef unsigned long uint16_t;
32# else
33# if SIZEOF_SHORT == 2
34 typedef short int16_t;
35 typedef unsigned short uint16_t;
36# else
37# error Must have a form of 16-bit integer
38# endif
39# endif
40#endif
41
42typedef signed char int8_t;
43typedef unsigned char uint8_t;