Blob


1 #ifndef _U_H_
2 #define _U_H_ 1
3 #if defined(__cplusplus)
4 extern "C" {
5 #endif
7 #define _BSD_SOURCE 1
8 #define _SVID_SOURCE 1
9 #define _XOPEN_SOURCE 1000
10 #define _XOPEN_SOURCE_EXTENDED 1
11 #define _LARGEFILE64_SOURCE 1
12 #define _FILE_OFFSET_BITS 64
13 #define __EXTENSIONS__ 1 /* SunOS */
15 #include <unistd.h>
16 #include <string.h>
17 #include <stdlib.h>
18 #include <stdarg.h>
19 #include <fcntl.h>
20 #include <assert.h>
21 #include <setjmp.h>
22 #include <stddef.h>
23 #include <utf.h>
24 #include <fmt.h>
25 #include <math.h>
26 #include <ctype.h> /* for tolower */
28 /*
29 * OS-specific crap
30 */
31 #define _NEEDUCHAR 1
32 #define _NEEDUSHORT 1
33 #define _NEEDUINT 1
34 #define _NEEDULONG 1
36 typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
38 #if defined(__linux__)
39 # include <sys/types.h>
40 # if defined(__USE_MISC)
41 # undef _NEEDUSHORT
42 # undef _NEEDUINT
43 # undef _NEEDULONG
44 # endif
45 #endif
46 #if defined(__sun__)
47 # include <sys/types.h>
48 # undef _NEEDUSHORT
49 # undef _NEEDUINT
50 # undef _NEEDULONG
51 #endif
52 #if defined(__FreeBSD__)
53 # include <sys/types.h>
54 # if !defined(_POSIX_SOURCE)
55 # undef _NEEDUSHORT
56 # undef _NEEDUINT
57 # endif
58 #endif
59 #if defined(__APPLE__)
60 # include <sys/types.h>
61 # undef _NEEDUSHORT
62 # undef _NEEDUINT
63 # define _NEEDLL 1
64 #endif
66 typedef signed char schar;
67 typedef unsigned int u32int;
68 typedef int s32int;
70 #ifdef _NEEDUCHAR
71 typedef unsigned char uchar;
72 #endif
73 #ifdef _NEEDUSHORT
74 typedef unsigned short ushort;
75 #endif
76 #ifdef _NEEDUINT
77 typedef unsigned int uint;
78 #endif
79 #ifdef _NEEDULONG
80 typedef unsigned long ulong;
81 #endif
82 typedef unsigned long long uvlong;
83 typedef long long vlong;
84 typedef uvlong u64int;
85 typedef vlong s64int;
86 typedef uchar u8int;
87 typedef schar s8int;
88 typedef ushort u16int;
89 typedef short s16int;
91 #undef _NEEDUCHAR
92 #undef _NEEDUSHORT
93 #undef _NEEDUINT
94 #undef _NEEDULONG
96 #if defined(__cplusplus)
97 }
98 #endif
99 #endif