8b30318f83b7f3b68e6c8333e7e34cf38da94b0d
[lunaix-os.git] / lunaix-os / usr / includes / sys / types.h
1 #ifndef __LUNAIX_SYS_TYPES_H
2 #define __LUNAIX_SYS_TYPES_H
3
4 #define NULL (void*)0
5
6 #define PEXITTERM 0x100
7 #define PEXITSTOP 0x200
8 #define PEXITSIG 0x400
9
10 #define PEXITNUM(flag, code) (flag | (code & 0xff))
11
12 #define WNOHANG 1
13 #define WUNTRACED 2
14 #define WEXITSTATUS(wstatus) ((wstatus & 0xff))
15 #define WIFSTOPPED(wstatus) ((wstatus & PEXITSTOP))
16 #define WIFEXITED(wstatus)                                                     \
17     ((wstatus & PEXITTERM) && ((char)WEXITSTATUS(wstatus) >= 0))
18
19 #define WIFSIGNALED(wstatus) ((wstatus & PEXITSIG))
20
21 typedef signed long ssize_t;
22
23 typedef int pid_t;
24
25 typedef unsigned long size_t;
26
27 typedef unsigned long off_t;
28
29 #endif /* __LUNAIX_TYPES_H */