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>27 /*28 * OS-specific crap29 */30 #define _NEEDUCHAR 131 #define _NEEDUSHORT 132 #define _NEEDUINT 133 #define _NEEDULONG 135 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 _NEEDUSHORT41 # undef _NEEDUINT42 # undef _NEEDULONG43 # endif44 #endif45 #if defined(__sun__)46 # include <sys/types.h>47 # undef _NEEDUSHORT48 # undef _NEEDUINT49 # undef _NEEDULONG50 #endif51 #if defined(__FreeBSD__)52 # include <sys/types.h>53 # if !defined(_POSIX_SOURCE)54 # undef _NEEDUSHORT55 # undef _NEEDUINT56 # endif57 #endif58 #if defined(__APPLE__)59 # include <sys/types.h>60 # undef _NEEDUSHORT61 # undef _NEEDUINT62 # define _NEEDLL 163 #endif65 typedef signed char schar;66 typedef unsigned int u32int;67 #ifdef _NEEDUCHAR68 typedef unsigned char uchar;69 #endif70 #ifdef _NEEDUSHORT71 typedef unsigned short ushort;72 #endif73 #ifdef _NEEDUINT74 typedef unsigned int uint;75 #endif76 #ifdef _NEEDULONG77 typedef unsigned long ulong;78 #endif79 typedef unsigned long long uvlong;80 typedef long long vlong;81 typedef uvlong u64int;82 typedef uchar u8int;83 typedef ushort u16int;85 #undef _NEEDUCHAR86 #undef _NEEDUSHORT87 #undef _NEEDUINT88 #undef _NEEDULONG90 #if defined(__cplusplus)91 }92 #endif93 #endif