File: inttypes.h.in

package info (click to toggle)
apt 0.3.19
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,328 kB
  • ctags: 4,573
  • sloc: cpp: 23,660; sh: 2,279; makefile: 369; perl: 209
file content (43 lines) | stat: -rw-r--r-- 978 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* This is an ISO C 9X header file. We omit this copy to the include 
   directory if the local platform does not have inttypes.h, it contains
   [u]int[8,16,32]_t fixed width types */

#include <config.h>

/* Generate the fixed bit size types */
#if SIZEOF_INT == 4
  typedef int int32_t;
  typedef unsigned int uint32_t;
#else
# if SIZEOF_LONG == 4
  typedef long int32_t;
  typedef unsigned long uint32_t;
# else
#  if SIZEOF_SHORT == 4
    typedef short int32_t;
    typedef unsigned short uint32_t;
#  else
#   error Must have a form of 32-bit integer
#  endif
# endif
#endif

#if SIZEOF_INT == 2
  typedef int int16_t;
  typedef unsigned int uint16_t;
#else
# if SIZEOF_LONG == 2
   typedef long int16_t;
   typedef unsigned long uint16_t;
# else
#  if SIZEOF_SHORT == 2
    typedef short int16_t;
    typedef unsigned short uint16_t;
#  else
#   error Must have a form of 16-bit integer
#  endif
# endif
#endif

typedef signed char int8_t;
typedef unsigned char uint8_t;