mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Improve isystem includes and magic numbers
This commit is contained in:
parent
1e5bd4d23e
commit
228fb7428b
143 changed files with 1183 additions and 266 deletions
|
@ -1,4 +1,4 @@
|
|||
#ifndef LIBC_ISYSTEM_ENDIAN_H_
|
||||
#define LIBC_ISYSTEM_ENDIAN_H_
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/bits/newbie.h"
|
||||
#endif
|
||||
|
|
4
libc/isystem/langinfo.h
Normal file
4
libc/isystem/langinfo.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_ */
|
4
libc/isystem/locale.h
Normal file
4
libc/isystem/locale.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_
|
||||
#include "libc/unicode/locale.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_ */
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef LIBC_ISYSTEM_SIGNAL_H_
|
||||
#define LIBC_ISYSTEM_SIGNAL_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/sigbits.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/calls/struct/siginfo.h"
|
||||
#include "libc/sysv/consts/sicode.h"
|
||||
#endif
|
||||
|
|
7
libc/isystem/stat.h
Normal file
7
libc/isystem/stat.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STAT_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_STAT_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/s.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STAT_H_ */
|
7
libc/isystem/strings.h
Normal file
7
libc/isystem/strings.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STRINGS_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_STRINGS_H_
|
||||
#include "libc/str/str.h"
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#include "libc/nexgen32e/ffs.h"
|
||||
#endif
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STRINGS_H_ */
|
5
libc/isystem/sys/dir.h
Normal file
5
libc/isystem/sys/dir.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_DIR_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_DIR_H_
|
||||
#include "libc/isystem/dirent.h"
|
||||
#define direct dirent
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_DIR_H_ */
|
4
libc/isystem/sys/errno.h
Normal file
4
libc/isystem/sys/errno.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_ERRNO_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_ERRNO_H_
|
||||
#include "libc/isystem/errno.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_ERRNO_H_ */
|
4
libc/isystem/sys/fcntl.h
Normal file
4
libc/isystem/sys/fcntl.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_FCNTL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_FCNTL_H_
|
||||
#include "libc/isystem/fcntl.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_FCNTL_H_ */
|
10
libc/isystem/sys/file.h
Normal file
10
libc/isystem/sys/file.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_FILE_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_FILE_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/lock.h"
|
||||
|
||||
#define L_SET SEEK_SET
|
||||
#define L_INCR SEEK_CUR
|
||||
#define L_XTND SEEK_END
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_FILE_H_ */
|
|
@ -1,6 +1,11 @@
|
|||
#ifndef LIBC_ISYSTEM_SYS_IOCTL_H_
|
||||
#define LIBC_ISYSTEM_SYS_IOCTL_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/ioctl.h"
|
||||
#include "libc/calls/struct/winsize.h"
|
||||
#include "libc/sysv/consts/blk.h"
|
||||
#include "libc/sysv/consts/fd.h"
|
||||
#include "libc/sysv/consts/n.h"
|
||||
#include "libc/sysv/consts/pty.h"
|
||||
#include "libc/sysv/consts/sio.h"
|
||||
#endif
|
||||
|
|
6
libc/isystem/sys/ipc.h
Normal file
6
libc/isystem/sys/ipc.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_IPC_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_IPC_H_
|
||||
#include "libc/calls/ipc.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/ipc.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_IPC_H_ */
|
|
@ -1,6 +1,17 @@
|
|||
#ifndef LIBC_ISYSTEM_SYS_MMAN_H_
|
||||
#define LIBC_ISYSTEM_SYS_MMAN_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/mlock.h"
|
||||
#include "libc/sysv/consts/msync.h"
|
||||
#include "libc/sysv/consts/posix.h"
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#include "libc/sysv/consts/madv.h"
|
||||
#endif
|
||||
#if defined(_GNU_SOURCE)
|
||||
#include "libc/sysv/consts/mfd.h"
|
||||
#include "libc/sysv/consts/mremap.h"
|
||||
#endif
|
||||
#endif
|
||||
|
|
6
libc/isystem/sys/mount.h
Normal file
6
libc/isystem/sys/mount.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_MOUNT_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_MOUNT_H_
|
||||
#include "libc/calls/mount.h"
|
||||
#include "libc/sysv/consts/mount.h"
|
||||
#include "libc/sysv/consts/unmount.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_MOUNT_H_ */
|
5
libc/isystem/sys/msg.h
Normal file
5
libc/isystem/sys/msg.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_MSG_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_MSG_H_
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/msg.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_MSG_H_ */
|
4
libc/isystem/sys/poll.h
Normal file
4
libc/isystem/sys/poll.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_POLL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_POLL_H_
|
||||
#include "libc/isystem/poll.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_POLL_H_ */
|
5
libc/isystem/sys/ptrace.h
Normal file
5
libc/isystem/sys/ptrace.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_PTRACE_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_PTRACE_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/ptrace.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_PTRACE_H_ */
|
5
libc/isystem/sys/reboot.h
Normal file
5
libc/isystem/sys/reboot.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_REBOOT_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_REBOOT_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/reboot.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_REBOOT_H_ */
|
|
@ -1,4 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_RESOURCE_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_RESOURCE_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/rlimit.h"
|
||||
#include "libc/calls/struct/rusage.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/prio.h"
|
||||
#include "libc/sysv/consts/rlim.h"
|
||||
#include "libc/sysv/consts/rlimit.h"
|
||||
#include "libc/sysv/consts/rusage.h"
|
||||
#endif
|
||||
|
|
5
libc/isystem/sys/select.h
Normal file
5
libc/isystem/sys/select.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_SELECT_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_SELECT_H_
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sock/select.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_SELECT_H_ */
|
4
libc/isystem/sys/signal.h
Normal file
4
libc/isystem/sys/signal.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_SIGNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_SIGNAL_H_
|
||||
#include "libc/isystem/signal.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_SIGNAL_H_ */
|
4
libc/isystem/sys/statvfs.h
Normal file
4
libc/isystem/sys/statvfs.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STATVFS_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_STATVFS_H_
|
||||
#include "libc/sysv/consts/st.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STATVFS_H_ */
|
4
libc/isystem/sys/syscall.h
Normal file
4
libc/isystem/sys/syscall.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYSCALL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYSCALL_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYSCALL_H_ */
|
4
libc/isystem/sys/termios.h
Normal file
4
libc/isystem/sys/termios.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_TERMIOS_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_TERMIOS_H_
|
||||
#include "libc/isystem/termios.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_TERMIOS_H_ */
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef LIBC_ISYSTEM_SYS_TIME_H_
|
||||
#define LIBC_ISYSTEM_SYS_TIME_H_
|
||||
#include "libc/calls/struct/timeval.h"
|
||||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/itimer.h"
|
||||
#include "libc/time/struct/timezone.h"
|
||||
#include "libc/time/time.h"
|
||||
#endif
|
||||
|
|
5
libc/isystem/sys/times.h
Normal file
5
libc/isystem/sys/times.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_TIMES_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_TIMES_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/tms.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_TIMES_H_ */
|
4
libc/isystem/sys/ttydefaults.h
Normal file
4
libc/isystem/sys/ttydefaults.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_TTYDEFAULTS_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_TTYDEFAULTS_H_
|
||||
#include "libc/calls/ttydefaults.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_TTYDEFAULTS_H_ */
|
|
@ -1,4 +1,20 @@
|
|||
#ifndef LIBC_ISYSTEM_SYS_TYPES_H_
|
||||
#define LIBC_ISYSTEM_SYS_TYPES_H_
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef unsigned u_int32_t;
|
||||
typedef char *caddr_t;
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short, ushort;
|
||||
typedef unsigned u_int, uint;
|
||||
typedef unsigned long u_long, ulong;
|
||||
typedef long long quad_t;
|
||||
typedef unsigned long long u_quad_t;
|
||||
#include <endian.h>
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
4
libc/isystem/sys/un.h
Normal file
4
libc/isystem/sys/un.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_UN_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_SYS_UN_H_
|
||||
#include "libc/sock/sock.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_UN_H_ */
|
|
@ -1,4 +1,5 @@
|
|||
#ifndef LIBC_ISYSTEM_SYS_UTSNAME_H_
|
||||
#define LIBC_ISYSTEM_SYS_UTSNAME_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/utsname.h"
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef LIBC_ISYSTEM_SYS_WAIT_H_
|
||||
#define LIBC_ISYSTEM_SYS_WAIT_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/w.h"
|
||||
#endif
|
||||
|
|
6
libc/isystem/uio.h
Normal file
6
libc/isystem/uio.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_UIO_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_UIO_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_UIO_H_ */
|
4
libc/isystem/wait.h
Normal file
4
libc/isystem/wait.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_WAIT_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_WAIT_H_
|
||||
#include "libc/isystem/sys/wait.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_WAIT_H_ */
|
4
libc/isystem/zlib.h
Normal file
4
libc/isystem/zlib.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ZLIB_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_ZLIB_H_
|
||||
#include "third_party/zlib/zlib.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ZLIB_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue