-
Notifications
You must be signed in to change notification settings - Fork 9
/
unix.h
56 lines (43 loc) · 1008 Bytes
/
unix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <inttypes.h>
#include <string.h>
#ifndef NSIG
#define NSIG 32
#endif
#ifndef ERRMAX
#define ERRMAX 128
#endif
/* plan 9 compatibility */
#define RFPROC 1
#define RFFDG 1
#define RFNOTEG 1
#define uintptr uintptr_t
#define Rune wchar_t
#define nil ((void*)0)
/* in case uchar, etc. are built-in types */
#define uchar _fmtuchar
#define ushort _fmtushort
#define uint _fmtuint
#define ulong _fmtulong
#define vlong _fmtvlong
#define uvlong _fmtuvlong
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned long long uvlong;
#define OREAD O_RDONLY
#define OWRITE O_WRONLY
#define ORDWR O_RDWR
#define OCEXEC 0
extern char *argv0;
extern int chartorune(wchar_t *, const char *);
extern int rfork(int);
extern void errstr(char *, int);
#define rerrstr errstr
extern void exechistory(void);