mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 22:19:10 +00:00
Fix bugs in cosmocc toolchain
This change integrates e58abc1110b335a3341e8ad5821ad8e3880d9bb2 from https://github.com/ahgamut/musl-cross-make/ which fixes the issues we were having with our C language extension for symbolic constants. This change also performs some code cleanup and bug fixes to getaddrinfo(). It's now possible to compile projects like ncurses, readline and python without needing to patch anything upstream, except maybe a line or two. Pretty soon it should be possible to build a Linux distro on Cosmo.
This commit is contained in:
parent
22f81a8d50
commit
23e235b7a5
272 changed files with 3491 additions and 4350 deletions
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_
|
||||
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_
|
||||
#include "libc/runtime/symbolic.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -55,59 +54,86 @@ extern const int32_t POLL_HUP;
|
|||
extern const int32_t SYS_SECCOMP;
|
||||
extern const int32_t SYS_USER_DISPATCH;
|
||||
|
||||
#define CLD_EXITED 1
|
||||
#define CLD_KILLED 2
|
||||
#define CLD_DUMPED 3
|
||||
#define CLD_TRAPPED 4
|
||||
#define CLD_STOPPED 5
|
||||
#define CLD_CONTINUED 6
|
||||
#define TRAP_BRKPT 1
|
||||
#define TRAP_TRACE 2
|
||||
#define SEGV_MAPERR 1
|
||||
#define SEGV_ACCERR 2
|
||||
#define ILL_ILLOPC 1
|
||||
#define ILL_PRVREG 6
|
||||
#define ILL_COPROC 7
|
||||
#define ILL_BADSTK 8
|
||||
#define BUS_ADRALN 1
|
||||
#define BUS_ADRERR 2
|
||||
#define BUS_OBJERR 3
|
||||
#define POLL_IN 1
|
||||
#define POLL_OUT 2
|
||||
#define POLL_MSG 3
|
||||
#define POLL_ERR 4
|
||||
#define POLL_PRI 5
|
||||
#define POLL_HUP 6
|
||||
|
||||
#define SI_USER SI_USER
|
||||
#define SI_QUEUE SI_QUEUE
|
||||
#define SI_TIMER SI_TIMER
|
||||
#define SI_MESGQ SI_MESGQ
|
||||
#define SI_ASYNCIO SI_ASYNCIO
|
||||
#define SI_TKILL SI_TKILL
|
||||
#define SI_ASYNCNL SI_ASYNCNL
|
||||
#define SI_KERNEL SI_KERNEL
|
||||
#define SI_NOINFO SI_NOINFO
|
||||
#define SEGV_PKUERR SEGV_PKUERR
|
||||
#define FPE_INTDIV FPE_INTDIV
|
||||
#define FPE_INTOVF FPE_INTOVF
|
||||
#define FPE_FLTDIV FPE_FLTDIV
|
||||
#define FPE_FLTOVF FPE_FLTOVF
|
||||
#define FPE_FLTUND FPE_FLTUND
|
||||
#define FPE_FLTRES FPE_FLTRES
|
||||
#define FPE_FLTINV FPE_FLTINV
|
||||
#define FPE_FLTSUB FPE_FLTSUB
|
||||
#define ILL_ILLOPN ILL_ILLOPN
|
||||
#define ILL_ILLADR ILL_ILLADR
|
||||
#define ILL_ILLTRP ILL_ILLTRP
|
||||
#define ILL_PRVOPC ILL_PRVOPC
|
||||
#define BUS_OOMERR BUS_OOMERR
|
||||
#define BUS_MCEERR_AR BUS_MCEERR_AR
|
||||
#define BUS_MCEERR_AO BUS_MCEERR_AO
|
||||
#define SYS_SECCOMP SYS_SECCOMP
|
||||
#define SYS_USER_DISPATCH SYS_USER_DISPATCH
|
||||
|
||||
#define __tmpcosmo_SI_USER -1926503818
|
||||
#define __tmpcosmo_SI_QUEUE -228293765
|
||||
#define __tmpcosmo_SI_TIMER 1203180061
|
||||
#define __tmpcosmo_SI_MESGQ -1084511784
|
||||
#define __tmpcosmo_SI_ASYNCIO 1487411924
|
||||
#define __tmpcosmo_SI_TKILL 1634610739
|
||||
#define __tmpcosmo_SI_ASYNCNL -1530073305
|
||||
#define __tmpcosmo_SI_KERNEL -267010337
|
||||
#define __tmpcosmo_SI_NOINFO 63879642
|
||||
#define __tmpcosmo_SEGV_PKUERR -1319250782
|
||||
#define __tmpcosmo_FPE_INTDIV 1306644255
|
||||
#define __tmpcosmo_FPE_INTOVF 898517272
|
||||
#define __tmpcosmo_FPE_FLTDIV -1040603884
|
||||
#define __tmpcosmo_FPE_FLTOVF 1518847196
|
||||
#define __tmpcosmo_FPE_FLTUND -554070357
|
||||
#define __tmpcosmo_FPE_FLTRES 1214968898
|
||||
#define __tmpcosmo_FPE_FLTINV -545262120
|
||||
#define __tmpcosmo_FPE_FLTSUB -261967855
|
||||
#define __tmpcosmo_ILL_ILLOPN 489604315
|
||||
#define __tmpcosmo_ILL_ILLADR -493364773
|
||||
#define __tmpcosmo_ILL_ILLTRP -419421824
|
||||
#define __tmpcosmo_ILL_PRVOPC 1693076639
|
||||
#define __tmpcosmo_BUS_OOMERR -970295856
|
||||
#define __tmpcosmo_BUS_MCEERR_AR 1943789513
|
||||
#define __tmpcosmo_BUS_MCEERR_AO -1385003784
|
||||
#define __tmpcosmo_SYS_SECCOMP 983549433
|
||||
#define __tmpcosmo_SYS_USER_DISPATCH 570515398
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
||||
#define CLD_EXITED LITERALLY(1)
|
||||
#define CLD_KILLED LITERALLY(2)
|
||||
#define CLD_DUMPED LITERALLY(3)
|
||||
#define CLD_TRAPPED LITERALLY(4)
|
||||
#define CLD_STOPPED LITERALLY(5)
|
||||
#define CLD_CONTINUED LITERALLY(6)
|
||||
#define TRAP_BRKPT LITERALLY(1)
|
||||
#define TRAP_TRACE LITERALLY(2)
|
||||
#define SEGV_MAPERR LITERALLY(1)
|
||||
#define SEGV_ACCERR LITERALLY(2)
|
||||
#define ILL_ILLOPC LITERALLY(1)
|
||||
#define ILL_PRVREG LITERALLY(6)
|
||||
#define ILL_COPROC LITERALLY(7)
|
||||
#define ILL_BADSTK LITERALLY(8)
|
||||
#define BUS_ADRALN LITERALLY(1)
|
||||
#define BUS_ADRERR LITERALLY(2)
|
||||
#define BUS_OBJERR LITERALLY(3)
|
||||
#define POLL_IN LITERALLY(1)
|
||||
#define POLL_OUT LITERALLY(2)
|
||||
#define POLL_MSG LITERALLY(3)
|
||||
#define POLL_ERR LITERALLY(4)
|
||||
#define POLL_PRI LITERALLY(5)
|
||||
#define POLL_HUP LITERALLY(6)
|
||||
|
||||
#define SI_USER SYMBOLIC(SI_USER)
|
||||
#define SI_QUEUE SYMBOLIC(SI_QUEUE)
|
||||
#define SI_TIMER SYMBOLIC(SI_TIMER)
|
||||
#define SI_MESGQ SYMBOLIC(SI_MESGQ)
|
||||
#define SI_ASYNCIO SYMBOLIC(SI_ASYNCIO)
|
||||
#define SI_TKILL SYMBOLIC(SI_TKILL)
|
||||
#define SI_ASYNCNL SYMBOLIC(SI_ASYNCNL)
|
||||
#define SI_KERNEL SYMBOLIC(SI_KERNEL)
|
||||
#define SI_NOINFO SYMBOLIC(SI_NOINFO)
|
||||
#define SEGV_PKUERR SYMBOLIC(SEGV_PKUERR)
|
||||
#define FPE_INTDIV SYMBOLIC(FPE_INTDIV)
|
||||
#define FPE_INTOVF SYMBOLIC(FPE_INTOVF)
|
||||
#define FPE_FLTDIV SYMBOLIC(FPE_FLTDIV)
|
||||
#define FPE_FLTOVF SYMBOLIC(FPE_FLTOVF)
|
||||
#define FPE_FLTUND SYMBOLIC(FPE_FLTUND)
|
||||
#define FPE_FLTRES SYMBOLIC(FPE_FLTRES)
|
||||
#define FPE_FLTINV SYMBOLIC(FPE_FLTINV)
|
||||
#define FPE_FLTSUB SYMBOLIC(FPE_FLTSUB)
|
||||
#define ILL_ILLOPN SYMBOLIC(ILL_ILLOPN)
|
||||
#define ILL_ILLADR SYMBOLIC(ILL_ILLADR)
|
||||
#define ILL_ILLTRP SYMBOLIC(ILL_ILLTRP)
|
||||
#define ILL_PRVOPC SYMBOLIC(ILL_PRVOPC)
|
||||
#define BUS_OOMERR SYMBOLIC(BUS_OOMERR)
|
||||
#define BUS_MCEERR_AR SYMBOLIC(BUS_MCEERR_AR)
|
||||
#define BUS_MCEERR_AO SYMBOLIC(BUS_MCEERR_AO)
|
||||
#define SYS_SECCOMP SYMBOLIC(SYS_SECCOMP)
|
||||
#define SYS_USER_DISPATCH SYMBOLIC(SYS_USER_DISPATCH)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SICODE_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue