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