mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 15:38:22 +00:00
Simplify cosmocc builds (#863)
- tcgetpgrp(STDIN_FILENO) should be equal to getpgrp() on Windows also, found while reading wget source code which uses this check to decide whether to print to stderr or to a file - IN6_ADDR_ARE_EQUAL is a comparison macro used when IPV6 is allowed, found while reading CPython3.11 source code - the changes in signal.h and addition of ucontext.h are because CPython3.11 source code expect sigaltstack to be available - the sqlite3.mk change is because CPython3.11 requires sqlite3 to be built with -DOMIT_SHARED_CACHE - unistd.h has getopt.h now, because some libraries like it there
This commit is contained in:
parent
f83eb440f7
commit
3eec69f9c3
7 changed files with 15 additions and 2 deletions
|
@ -43,7 +43,7 @@ int tcgetpgrp(int fd) {
|
||||||
} else if (IsBsd()) {
|
} else if (IsBsd()) {
|
||||||
rc = sys_ioctl(fd, TIOCGPGRP_bsd, &pgrp);
|
rc = sys_ioctl(fd, TIOCGPGRP_bsd, &pgrp);
|
||||||
} else if (IsWindows()) {
|
} else if (IsWindows()) {
|
||||||
rc = getpid();
|
pgrp = rc = getpid();
|
||||||
} else {
|
} else {
|
||||||
rc = enosys();
|
rc = enosys();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,4 +17,11 @@
|
||||||
#include "libc/sysv/consts/mcast.h"
|
#include "libc/sysv/consts/mcast.h"
|
||||||
#include "libc/sysv/consts/pf.h"
|
#include "libc/sysv/consts/pf.h"
|
||||||
#include "libc/sysv/consts/sock.h"
|
#include "libc/sysv/consts/sock.h"
|
||||||
|
|
||||||
|
# define IN6_ARE_ADDR_EQUAL(a,b) \
|
||||||
|
((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \
|
||||||
|
&& (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \
|
||||||
|
&& (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \
|
||||||
|
&& (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3]))
|
||||||
|
|
||||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IN_H_ */
|
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IN_H_ */
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/sigtimedwait.h"
|
#include "libc/calls/sigtimedwait.h"
|
||||||
#include "libc/calls/struct/sigaction.h"
|
#include "libc/calls/struct/sigaction.h"
|
||||||
|
#include "libc/calls/struct/sigaltstack.h"
|
||||||
#include "libc/calls/struct/siginfo.h"
|
#include "libc/calls/struct/siginfo.h"
|
||||||
#include "libc/sysv/consts/sa.h"
|
#include "libc/sysv/consts/sa.h"
|
||||||
#include "libc/sysv/consts/sicode.h"
|
#include "libc/sysv/consts/sicode.h"
|
||||||
|
|
4
libc/isystem/sys/ucontext.h
Normal file
4
libc/isystem/sys/ucontext.h
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#ifndef _SYS_UCONTEXT_H
|
||||||
|
#define _SYS_UCONTEXT_H
|
||||||
|
#include "libc/calls/ucontext.h"
|
||||||
|
#endif /* _SYS_UCONTEXT_H */
|
|
@ -10,6 +10,7 @@
|
||||||
#include "libc/sysv/consts/o.h"
|
#include "libc/sysv/consts/o.h"
|
||||||
#include "libc/sysv/consts/ok.h"
|
#include "libc/sysv/consts/ok.h"
|
||||||
#include "libc/time/time.h"
|
#include "libc/time/time.h"
|
||||||
|
#include "third_party/getopt/long.h"
|
||||||
#include "third_party/musl/crypt.h"
|
#include "third_party/musl/crypt.h"
|
||||||
#include "third_party/musl/lockf.h"
|
#include "third_party/musl/lockf.h"
|
||||||
#endif /* _UNISTD_H */
|
#endif /* _UNISTD_H */
|
||||||
|
|
1
third_party/libcxx/csignal
vendored
1
third_party/libcxx/csignal
vendored
|
@ -45,6 +45,7 @@ int raise(int sig);
|
||||||
#include "libc/calls/struct/sigaction.h"
|
#include "libc/calls/struct/sigaction.h"
|
||||||
#include "libc/calls/struct/siginfo.h"
|
#include "libc/calls/struct/siginfo.h"
|
||||||
#include "libc/sysv/consts/sa.h"
|
#include "libc/sysv/consts/sa.h"
|
||||||
|
#include "libc/sysv/consts/sig.h"
|
||||||
#include "libc/sysv/consts/sicode.h"
|
#include "libc/sysv/consts/sicode.h"
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
|
|
1
third_party/sqlite3/sqlite3.mk
vendored
1
third_party/sqlite3/sqlite3.mk
vendored
|
@ -121,7 +121,6 @@ THIRD_PARTY_SQLITE3_FLAGS = \
|
||||||
-DSQLITE_OMIT_UTF16 \
|
-DSQLITE_OMIT_UTF16 \
|
||||||
-DSQLITE_OMIT_TCL_VARIABLE \
|
-DSQLITE_OMIT_TCL_VARIABLE \
|
||||||
-DSQLITE_OMIT_LOAD_EXTENSION \
|
-DSQLITE_OMIT_LOAD_EXTENSION \
|
||||||
-DSQLITE_OMIT_SHARED_CACHE \
|
|
||||||
-DSQLITE_OMIT_AUTOINIT \
|
-DSQLITE_OMIT_AUTOINIT \
|
||||||
-DSQLITE_OMIT_GET_TABLE \
|
-DSQLITE_OMIT_GET_TABLE \
|
||||||
-DSQLITE_OMIT_COMPILEOPTION_DIAGS \
|
-DSQLITE_OMIT_COMPILEOPTION_DIAGS \
|
||||||
|
|
Loading…
Add table
Reference in a new issue