mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 05:20:28 +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_IPPROTO_H_
|
||||
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IPPROTO_H_
|
||||
#include "libc/runtime/symbolic.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -38,42 +37,69 @@ extern const int IPPROTO_TP;
|
|||
extern const int IPPROTO_UDP;
|
||||
extern const int IPPROTO_UDPLITE;
|
||||
|
||||
#define IPPROTO_IP 0
|
||||
#define IPPROTO_ICMP 1
|
||||
#define IPPROTO_TCP 6
|
||||
#define IPPROTO_UDP 17
|
||||
#define IPPROTO_RAW 255
|
||||
#define IPPROTO_MAX 263 /* xxx */
|
||||
|
||||
#define IPPROTO_AH IPPROTO_AH
|
||||
#define IPPROTO_BEETPH IPPROTO_BEETPH
|
||||
#define IPPROTO_COMP IPPROTO_COMP
|
||||
#define IPPROTO_DCCP IPPROTO_DCCP
|
||||
#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS
|
||||
#define IPPROTO_EGP IPPROTO_EGP
|
||||
#define IPPROTO_ENCAP IPPROTO_ENCAP
|
||||
#define IPPROTO_ESP IPPROTO_ESP
|
||||
#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT
|
||||
#define IPPROTO_GRE IPPROTO_GRE
|
||||
#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
|
||||
#define IPPROTO_ICMPV6 IPPROTO_ICMPV6
|
||||
#define IPPROTO_IDP IPPROTO_IDP
|
||||
#define IPPROTO_IGMP IPPROTO_IGMP
|
||||
#define IPPROTO_IPIP IPPROTO_IPIP
|
||||
#define IPPROTO_IPV6 IPPROTO_IPV6
|
||||
#define IPPROTO_MH IPPROTO_MH
|
||||
#define IPPROTO_MPLS IPPROTO_MPLS
|
||||
#define IPPROTO_MTP IPPROTO_MTP
|
||||
#define IPPROTO_NONE IPPROTO_NONE
|
||||
#define IPPROTO_PIM IPPROTO_PIM
|
||||
#define IPPROTO_PUP IPPROTO_PUP
|
||||
#define IPPROTO_ROUTING IPPROTO_ROUTING
|
||||
#define IPPROTO_RSVP IPPROTO_RSVP
|
||||
#define IPPROTO_SCTP IPPROTO_SCTP
|
||||
#define IPPROTO_TP IPPROTO_TP
|
||||
#define IPPROTO_UDPLITE IPPROTO_UDPLITE
|
||||
|
||||
#define __tmpcosmo_IPPROTO_AH -1870674383
|
||||
#define __tmpcosmo_IPPROTO_BEETPH -88002196
|
||||
#define __tmpcosmo_IPPROTO_COMP -1180207155
|
||||
#define __tmpcosmo_IPPROTO_DCCP -1414939404
|
||||
#define __tmpcosmo_IPPROTO_DSTOPTS -301626931
|
||||
#define __tmpcosmo_IPPROTO_EGP 1981296310
|
||||
#define __tmpcosmo_IPPROTO_ENCAP -1186890893
|
||||
#define __tmpcosmo_IPPROTO_ESP 1912922673
|
||||
#define __tmpcosmo_IPPROTO_FRAGMENT 815526741
|
||||
#define __tmpcosmo_IPPROTO_GRE -1086664412
|
||||
#define __tmpcosmo_IPPROTO_HOPOPTS 288110026
|
||||
#define __tmpcosmo_IPPROTO_ICMPV6 -517548243
|
||||
#define __tmpcosmo_IPPROTO_IDP -33178791
|
||||
#define __tmpcosmo_IPPROTO_IGMP 1855375045
|
||||
#define __tmpcosmo_IPPROTO_IPIP -1399362390
|
||||
#define __tmpcosmo_IPPROTO_IPV6 -710044241
|
||||
#define __tmpcosmo_IPPROTO_MH 1137562059
|
||||
#define __tmpcosmo_IPPROTO_MPLS -796619090
|
||||
#define __tmpcosmo_IPPROTO_MTP -1938822508
|
||||
#define __tmpcosmo_IPPROTO_NONE -1481051745
|
||||
#define __tmpcosmo_IPPROTO_PIM 1072180675
|
||||
#define __tmpcosmo_IPPROTO_PUP 1814067734
|
||||
#define __tmpcosmo_IPPROTO_ROUTING -1022888846
|
||||
#define __tmpcosmo_IPPROTO_RSVP -568010455
|
||||
#define __tmpcosmo_IPPROTO_SCTP -1561155298
|
||||
#define __tmpcosmo_IPPROTO_TP -1222369418
|
||||
#define __tmpcosmo_IPPROTO_UDPLITE -444852753
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
||||
#define IPPROTO_IP LITERALLY(0)
|
||||
#define IPPROTO_ICMP LITERALLY(1)
|
||||
#define IPPROTO_TCP LITERALLY(6)
|
||||
#define IPPROTO_UDP LITERALLY(17)
|
||||
#define IPPROTO_RAW LITERALLY(255)
|
||||
#define IPPROTO_MAX LITERALLY(263) /* xxx */
|
||||
|
||||
#define IPPROTO_AH SYMBOLIC(IPPROTO_AH)
|
||||
#define IPPROTO_BEETPH SYMBOLIC(IPPROTO_BEETPH)
|
||||
#define IPPROTO_COMP SYMBOLIC(IPPROTO_COMP)
|
||||
#define IPPROTO_DCCP SYMBOLIC(IPPROTO_DCCP)
|
||||
#define IPPROTO_DSTOPTS SYMBOLIC(IPPROTO_DSTOPTS)
|
||||
#define IPPROTO_EGP SYMBOLIC(IPPROTO_EGP)
|
||||
#define IPPROTO_ENCAP SYMBOLIC(IPPROTO_ENCAP)
|
||||
#define IPPROTO_ESP SYMBOLIC(IPPROTO_ESP)
|
||||
#define IPPROTO_FRAGMENT SYMBOLIC(IPPROTO_FRAGMENT)
|
||||
#define IPPROTO_GRE SYMBOLIC(IPPROTO_GRE)
|
||||
#define IPPROTO_HOPOPTS SYMBOLIC(IPPROTO_HOPOPTS)
|
||||
#define IPPROTO_ICMPV6 SYMBOLIC(IPPROTO_ICMPV6)
|
||||
#define IPPROTO_IDP SYMBOLIC(IPPROTO_IDP)
|
||||
#define IPPROTO_IGMP SYMBOLIC(IPPROTO_IGMP)
|
||||
#define IPPROTO_IPIP SYMBOLIC(IPPROTO_IPIP)
|
||||
#define IPPROTO_IPV6 SYMBOLIC(IPPROTO_IPV6)
|
||||
#define IPPROTO_MH SYMBOLIC(IPPROTO_MH)
|
||||
#define IPPROTO_MPLS SYMBOLIC(IPPROTO_MPLS)
|
||||
#define IPPROTO_MTP SYMBOLIC(IPPROTO_MTP)
|
||||
#define IPPROTO_NONE SYMBOLIC(IPPROTO_NONE)
|
||||
#define IPPROTO_PIM SYMBOLIC(IPPROTO_PIM)
|
||||
#define IPPROTO_PUP SYMBOLIC(IPPROTO_PUP)
|
||||
#define IPPROTO_ROUTING SYMBOLIC(IPPROTO_ROUTING)
|
||||
#define IPPROTO_RSVP SYMBOLIC(IPPROTO_RSVP)
|
||||
#define IPPROTO_SCTP SYMBOLIC(IPPROTO_SCTP)
|
||||
#define IPPROTO_TP SYMBOLIC(IPPROTO_TP)
|
||||
#define IPPROTO_UDPLITE SYMBOLIC(IPPROTO_UDPLITE)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_IPPROTO_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue