Improve the cosmocc toolchain

These changes were necessary to help Blink become buildable using
Cosmopolitan Libc.
This commit is contained in:
Justine Tunney 2023-01-05 12:20:52 -08:00
parent d73523864a
commit 416e173448
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
5 changed files with 9 additions and 4 deletions

View file

@ -374,11 +374,9 @@ COSMOPOLITAN_HEADERS = \
THIRD_PARTY_GDTOA \
THIRD_PARTY_GETOPT \
THIRD_PARTY_MUSL \
THIRD_PARTY_ZLIB \
THIRD_PARTY_ZLIB_GZ \
THIRD_PARTY_REGEX
o/$(MODE)/cosmopolitan.a: \
o/$(MODE)/cosmopolitan.a: \
$(foreach x,$(COSMOPOLITAN_OBJECTS),$($(x)_A_OBJS))
o/cosmopolitan.h: \

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IP_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IP_H_
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NETINET_IP_H_ */

View file

@ -1,4 +1,5 @@
#ifndef LIBC_ISYSTEM_SYS_SYSINFO_H_
#define LIBC_ISYSTEM_SYS_SYSINFO_H_
#include "libc/calls/calls.h"
#include "libc/calls/struct/sysinfo.h"
#endif

View file

@ -2,6 +2,7 @@
#define COSMOPOLITAN_THIRD_PARTY_ZLIB_INTERNAL_H_
#include "libc/str/str.h"
#include "third_party/zlib/deflate.internal.h"
#include "third_party/zlib/zconf.h"
#define Z_CRC32_SSE42_MINIMUM_LENGTH 64
#define Z_CRC32_SSE42_CHUNKSIZE_MASK 15
@ -11,7 +12,6 @@ COSMOPOLITAN_C_START_
#define zmemzero bzero
#define zmemcpy memmove
#define z_const const
unsigned deflate_read_buf(z_streamp, Bytef *, unsigned) _Hide;
void copy_with_crc(z_streamp, Bytef *, long) _Hide;

View file

@ -11,6 +11,8 @@
#define ZLIB_DEBUG
#endif
#define z_const const
#if !(__ASSEMBLER__ + __LINKER__ + 0)
typedef unsigned char Byte;