cosmopolitan/libc/sysv/consts/pt.h
Justine Tunney 45b72485ad Fix XNU / FreeBSD / OpenBSD / RHEL5 / NT bugs
For the first time ever, all tests in this codebase now pass, when
run automatically on macos, freebsd, openbsd, rhel5, rhel7, alpine
and windows via the network using the runit and runitd build tools

- Fix vfork exec path etc.
- Add XNU opendir() support
- Add OpenBSD opendir() support
- Add Linux history to syscalls.sh
- Use copy_file_range on FreeBSD 13+
- Fix system calls with 7+ arguments
- Fix Windows with greater than 16 FDs
- Fix RUNIT.COM and RUNITD.COM flakiness
- Fix OpenBSD munmap() when files are mapped
- Fix long double so it's actually long on Windows
- Fix OpenBSD truncate() and ftruncate() thunk typo
- Let Windows fcntl() be used on socket files descriptors
- Fix Windows fstat() which had an accidental printf statement
- Fix RHEL5 CLOCK_MONOTONIC by not aliasing to CLOCK_MONOTONIC_RAW

This is wonderful. I never could have dreamed it would be possible
to get it working so well on so many platforms with tiny binaries.

Fixes #31
Fixes #25
Fixes #14
2021-01-25 18:31:17 -08:00

28 lines
1 KiB
C

#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_PT_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PT_H_
#include "libc/sysv/consts/ptrace.h"
#define PT_ATTACH PTRACE_ATTACH
#define PT_CONTINUE PTRACE_CONT
#define PT_DETACH PTRACE_DETACH
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
#define PT_GETFPREGS PTRACE_GETFPREGS
#define PT_GETFPXREGS PTRACE_GETFPXREGS
#define PT_GETREGS PTRACE_GETREGS
#define PT_GETSIGINFO PTRACE_GETSIGINFO
#define PT_KILL PTRACE_KILL
#define PT_READ_D PTRACE_PEEKDATA
#define PT_READ_I PTRACE_PEEKTEXT
#define PT_READ_U PTRACE_PEEKUSER
#define PT_SETFPREGS PTRACE_SETFPREGS
#define PT_SETFPXREGS PTRACE_SETFPXREGS
#define PT_SETOPTIONS PTRACE_SETOPTIONS
#define PT_SETREGS PTRACE_SETREGS
#define PT_SETSIGINFO PTRACE_SETSIGINFO
#define PT_STEP PTRACE_SINGLESTEP
#define PT_SYSCALL PTRACE_SYSCALL
#define PT_WRITE_D PTRACE_POKEDATA
#define PT_WRITE_I PTRACE_POKETEXT
#define PT_WRITE_U PTRACE_POKEUSER
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_PT_H_ */