Commit | Line | Data |
---|---|---|
2fe58dfd SE |
1 | /* -*- c -*- */ |
2 | ||
3 | /* These are from config.h.bot, pasted onto the end of config.h.in. */ | |
4 | ||
59635212 SE |
5 | #ifdef HAVE_INTTYPES_H |
6 | #include <inttypes.h> | |
7 | #else | |
8 | #ifdef HAVE_STDINT_H | |
9 | #include <stdint.h> | |
10 | #else | |
8dea8d37 SE |
11 | #if SIZEOF_UNSIGNED_LONG_LONG==8 |
12 | typedef unsigned long long uint64_t; | |
794f2398 | 13 | typedef long long int64_t; |
8dea8d37 SE |
14 | #elif SIZEOF_UNSIGNED_LONG==8 |
15 | typedef unsigned long uint64_t; | |
794f2398 | 16 | typedef long int64_t; |
8dea8d37 SE |
17 | #else |
18 | #error I do not know what to use for a uint64_t. | |
19 | #endif | |
20 | ||
21 | /* Give us an unsigned 32-bit data type. */ | |
22 | #if SIZEOF_UNSIGNED_LONG==4 | |
23 | typedef unsigned long uint32_t; | |
794f2398 | 24 | typedef long int32_t; |
8dea8d37 SE |
25 | #elif SIZEOF_UNSIGNED_INT==4 |
26 | typedef unsigned int uint32_t; | |
794f2398 | 27 | typedef int int32_t; |
8dea8d37 SE |
28 | #else |
29 | #error I do not know what to use for a uint32_t. | |
30 | #endif | |
31 | ||
32 | /* An unsigned 16-bit data type. */ | |
33 | #if SIZEOF_UNSIGNED_INT==2 | |
34 | typedef unsigned int uint16_t; | |
794f2398 | 35 | typedef int int16_t; |
8dea8d37 SE |
36 | #elif SIZEOF_UNSIGNED_SHORT==2 |
37 | typedef unsigned short uint16_t; | |
794f2398 | 38 | typedef short int16_t; |
8dea8d37 SE |
39 | #else |
40 | #error I do not know what to use for a uint16_t. | |
59635212 | 41 | #endif |
8dea8d37 SE |
42 | |
43 | /* An unsigned 8-bit data type */ | |
44 | #if SIZEOF_UNSIGNED_CHAR==1 | |
45 | typedef unsigned char uint8_t; | |
46 | #else | |
47 | #error I do not know what to use for a uint8_t. | |
48 | #endif | |
49 | #endif | |
50 | #endif | |
51 | ||
52 | #ifndef HAVE_SNPRINTF | |
469fd1d9 SE |
53 | #include <stdio.h> |
54 | #include <stdarg.h> | |
8dea8d37 | 55 | #include "snprintf.h" |
2fe58dfd SE |
56 | #endif |
57 | ||
4f5e39ec SE |
58 | #ifdef __GNUC__ |
59 | #define NORETURN(_x) void _x __attribute__ ((noreturn)) | |
60 | #define FORMAT(_a,_b,_c) __attribute__ ((format (_a,_b,_c))) | |
61 | #else | |
62 | #define NORETURN(_x) _x | |
63 | #define FORMAT(_a,_b,_c) | |
64 | #endif | |
65 | ||
2fe58dfd | 66 | #endif /* _CONFIG_H */ |