Rudiments
inttypes.h
1 // Copyright (c) 2005 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_INTTYPES_H
5 #define RUDIMENTS_INTTYPES_H
6 
7 #include <rudiments/private/config.h>
8 
9 #if defined(RUDIMENTS_HAVE_STDINT_H)
10  #include <stdint.h>
11 #elif defined(RUDIMENTS_HAVE_SYS_BITYPES_H)
12  // Tru64 needs __arch64__ for int64_t and uint64_t typedefs
13  #ifndef __arch64__
14  #define __arch64__
15  #endif
16  #include <sys/bitypes.h>
17 #elif defined(RUDIMENTS_HAVE_INTTYPES_H)
18  #include <inttypes.h>
19 #endif
20 
21 #ifndef RUDIMENTS_HAVE_INT8_T
22  typedef signed char int8_t;
23 #endif
24 #ifndef RUDIMENTS_HAVE_UINT8_T
25  typedef unsigned char uint8_t;
26 #endif
27 #ifndef RUDIMENTS_HAVE_INT16_T
28  typedef signed short int16_t;
29 #endif
30 #ifndef RUDIMENTS_HAVE_UINT16_T
31  typedef unsigned short uint16_t;
32 #endif
33 #ifndef RUDIMENTS_HAVE_INT32_T
34  typedef signed int int32_t;
35 #endif
36 #ifndef RUDIMENTS_HAVE_UINT32_T
37  typedef unsigned int uint32_t;
38 #endif
39 #ifndef RUDIMENTS_HAVE_INT64_T
40  typedef signed long long int64_t;
41 #endif
42 #ifndef RUDIMENTS_HAVE_UINT64_T
43  typedef unsigned long long uint64_t;
44 #endif
45 
46 #endif