Re-import of fprobe-ulog
[fprobe-ulog.git] / trunk / src / my_inttypes.h
1 /*
2         Copyright (C) Slava Astashonok <sla@0n.ru>
3
4         This program is free software; you can redistribute it and/or
5         modify it under the terms of the GNU General Public License.
6
7         $Id: my_inttypes.h,v 1.1.2.1 2004/08/13 20:41:19 sla Exp $
8 */
9
10 #ifndef _MY_INTTYPES_H_
11 #define _MY_INTTYPES_H_
12
13 #include <config.h>
14
15 #ifdef HAVE_INTTYPES_H
16 #include <inttypes.h>
17 #else
18
19 typedef unsigned char uint8_t;
20 typedef signed char int8_t;
21
22 typedef unsigned short uint16_t;
23 typedef short int16_t;
24
25 #if SIZEOF_INT == 4
26 typedef unsigned int uint32_t;
27 typedef int int32_t;
28 #else
29 #if SIZEOF_LONG == 4
30 typedef unsigned long uint32_t;
31 typedef long int32_t;
32 #else
33 #error "Can't find any 32 bit type"
34 #endif
35 #endif
36
37 #if SIZEOF_LONG == 8
38 typedef unsigned long uint64_t;
39 typedef long int64_t;
40 #else
41 #if SIZEOF_LONG_LONG == 8
42 typedef unsigned long long uint64_t;
43 typedef long long int64_t;
44 #else
45 #error "Can't find any 64 bit type"
46 #endif
47 #endif
48
49 #endif /* HAVE_INTTYPES_H */
50
51 #endif /* _MY_INTTYPES_H_ */