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>
27 /*
28 * OS-specific crap
29 */
30 #define _NEEDUCHAR 1
31 #define _NEEDUSHORT 1
32 #define _NEEDUINT 1
33 #define _NEEDULONG 1
35 typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
37 #if defined(__linux__)
38 # include <sys/types.h>
39 # if defined(__USE_MISC)
40 # undef _NEEDUSHORT
41 # undef _NEEDUINT
42 # undef _NEEDULONG
43 # endif
44 #endif
45 #if defined(__sun__)
46 # include <sys/types.h>
47 # undef _NEEDUSHORT
48 # undef _NEEDUINT
49 # undef _NEEDULONG
50 #endif
51 #if defined(__FreeBSD__)
52 # include <sys/types.h>
53 # if !defined(_POSIX_SOURCE)
54 # undef _NEEDUSHORT
55 # undef _NEEDUINT
56 # endif
57 #endif
58 #if defined(__APPLE__)
59 # include <sys/types.h>
60 # undef _NEEDUSHORT
61 # undef _NEEDUINT
62 # define _NEEDLL 1
63 #endif
65 typedef signed char schar;
66 typedef unsigned int u32int;
67 #ifdef _NEEDUCHAR
68 typedef unsigned char uchar;
69 #endif
70 #ifdef _NEEDUSHORT
71 typedef unsigned short ushort;
72 #endif
73 #ifdef _NEEDUINT
74 typedef unsigned int uint;
75 #endif
76 #ifdef _NEEDULONG
77 typedef unsigned long ulong;
78 #endif
79 typedef unsigned long long uvlong;
80 typedef long long vlong;
81 typedef uvlong u64int;
82 typedef uchar u8int;
83 typedef ushort u16int;
85 #undef _NEEDUCHAR
86 #undef _NEEDUSHORT
87 #undef _NEEDUINT
88 #undef _NEEDULONG
90 #if defined(__cplusplus)
91 }
92 #endif
93 #endif