Blob
1 #ifndef _U_H_2 #define _U_H_ 13 #if defined(__cplusplus)4 extern "C" {5 #endif7 #define _BSD_SOURCE 18 #define _SVID_SOURCE 19 #define _XOPEN_SOURCE 100010 #define _XOPEN_SOURCE_EXTENDED 111 #define _LARGEFILE64_SOURCE 112 #define _FILE_OFFSET_BITS 6413 #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 crap30 */31 #define _NEEDUCHAR 132 #define _NEEDUSHORT 133 #define _NEEDUINT 134 #define _NEEDULONG 136 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 _NEEDUSHORT42 # undef _NEEDUINT43 # undef _NEEDULONG44 # endif45 #endif46 #if defined(__sun__)47 # include <sys/types.h>48 # undef _NEEDUSHORT49 # undef _NEEDUINT50 # undef _NEEDULONG51 #endif52 #if defined(__FreeBSD__)53 # include <sys/types.h>54 # if !defined(_POSIX_SOURCE)55 # undef _NEEDUSHORT56 # undef _NEEDUINT57 # endif58 #endif59 #if defined(__APPLE__)60 # include <sys/types.h>61 # undef _NEEDUSHORT62 # undef _NEEDUINT63 # define _NEEDLL 164 #endif66 typedef signed char schar;67 typedef unsigned int u32int;68 typedef int s32int;70 #ifdef _NEEDUCHAR71 typedef unsigned char uchar;72 #endif73 #ifdef _NEEDUSHORT74 typedef unsigned short ushort;75 #endif76 #ifdef _NEEDUINT77 typedef unsigned int uint;78 #endif79 #ifdef _NEEDULONG80 typedef unsigned long ulong;81 #endif82 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 _NEEDUCHAR92 #undef _NEEDUSHORT93 #undef _NEEDUINT94 #undef _NEEDULONG96 #if defined(__cplusplus)97 }98 #endif99 #endif