};
+// Basic types
+
+typedef short $_C_short;
+typedef int $_C_int;
+typedef long $_C_long;
+typedef long long $_C_long_long;
+
// Time
typedef struct timespec $Timespec;
typedef struct rusage $Rusage;
typedef struct rlimit $Rlimit;
-typedef int $_C_int;
typedef gid_t $_Gid_t;
// Files
typedef socklen_t $_Socklen;
typedef struct linger $Linger;
+// Ptrace requests
+enum {
+ $_PTRACE_TRACEME = PT_TRACE_ME,
+ $_PTRACE_CONT = PT_CONTINUE,
+ $_PTRACE_KILL = PT_KILL,
+};
+
+
// Events (kqueue, kevent)
enum {
SizeofSockaddrInet6 = 0x1c;
SizeofSockaddrAny = 0x1c;
SizeofSockaddrUnix = 0x6a;
+ _PTRACE_TRACEME = 0;
+ _PTRACE_CONT = 0x7;
+ _PTRACE_KILL = 0x8;
EVFILT_READ = -0x1;
EVFILT_WRITE = -0x2;
EVFILT_AIO = -0x3;
// Types
+type _C_short int16
+
+type _C_int int32
+
+type _C_long int32
+
+type _C_long_long int64
+
type Timespec struct {
Sec int32;
Nsec int32;
Max uint64;
}
-type _C_int int32
-
type _Gid_t uint32
type Stat_t struct {
SizeofSockaddrInet6 = 0x1c;
SizeofSockaddrAny = 0x1c;
SizeofSockaddrUnix = 0x6a;
+ _PTRACE_TRACEME = 0;
+ _PTRACE_CONT = 0x7;
+ _PTRACE_KILL = 0x8;
EVFILT_READ = -0x1;
EVFILT_WRITE = -0x2;
EVFILT_AIO = -0x3;
// Types
+type _C_short int16
+
+type _C_int int32
+
+type _C_long int64
+
+type _C_long_long int64
+
type Timespec struct {
Sec int64;
Nsec int64;
Max uint64;
}
-type _C_int int32
-
type _Gid_t uint32
type Stat_t struct {