3 #if defined(__cplusplus)
7 #define __BSD_VISIBLE 1 /* FreeBSD 5.x */
8 #define __EXTENSIONS__ 1 /* SunOS */
10 #define _SVID_SOURCE 1
11 #define _XOPEN_SOURCE 1000
12 #define _XOPEN_SOURCE_EXTENDED 1
13 #define _LARGEFILE64_SOURCE 1
14 #define _FILE_OFFSET_BITS 64
27 #include <ctype.h> /* for tolower */
37 typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
39 #if defined(__linux__)
40 # include <sys/types.h>
41 # if defined(__USE_MISC)
46 # if defined(__Linux26__)
47 # define PLAN9PORT_USING_PTHREADS 1
49 #elif defined(__sun__)
50 # include <sys/types.h>
54 # define PLAN9PORT_USING_PTHREADS 1
55 #elif defined(__FreeBSD__)
56 # include <sys/types.h>
57 # include <osreldate.h>
58 # if !defined(_POSIX_SOURCE)
62 # if __FreeBSD_version >= 500000
63 # define PLAN9PORT_USING_PTHREADS 1
65 #elif defined(__APPLE__)
66 # include <sys/types.h>
70 # define PLAN9PORT_USING_PTHREADS 1
72 /* No idea what system this is -- try some defaults */
73 # define PLAN9PORT_USING_PTHREADS 1
80 #ifdef PLAN9PORT_USING_PTHREADS
84 typedef signed char schar;
85 typedef unsigned int u32int;
89 typedef unsigned char uchar;
92 typedef unsigned short ushort;
95 typedef unsigned int uint;
98 typedef unsigned long ulong;
100 typedef unsigned long long uvlong;
101 typedef long long vlong;
102 typedef uvlong u64int;
103 typedef vlong s64int;
106 typedef ushort u16int;
107 typedef short s16int;
115 * Funny-named symbols to tip off 9l to autolink.
117 #define AUTOLIB(x) static int __p9l_autolib_ ## x = 1;
119 #if defined(__cplusplus)