Clean up more code

- Found some bugs in LLVM compiler-rt library
- The useless LIBC_STUBS package is now deleted
- Improve the overflow checking story even further
- Get chibicc tests working in MODE=dbg mode again
- The libc/isystem/ headers now have correctly named guards
This commit is contained in:
Justine Tunney 2023-06-18 00:55:09 -07:00
parent afc58a8b41
commit d7c79f43ef
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
294 changed files with 912 additions and 1208 deletions

View file

@ -25,8 +25,7 @@ THIRD_PARTY_ARGON2_A_DIRECTDEPS = \
LIBC_STDIO \
LIBC_RUNTIME \
LIBC_SYSV_CALLS \
LIBC_STR \
LIBC_STUBS
LIBC_STR
THIRD_PARTY_ARGON2_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_ARGON2_A_DIRECTDEPS),$($(x))))

View file

@ -22,7 +22,6 @@ THIRD_PARTY_AWK_A_DIRECTDEPS = \
LIBC_STDIO \
LIBC_SYSV \
LIBC_STR \
LIBC_STUBS \
LIBC_TINYMATH \
TOOL_ARGS \
THIRD_PARTY_GDTOA

View file

@ -31,7 +31,6 @@ THIRD_PARTY_BZIP2_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV
THIRD_PARTY_BZIP2_A_DEPS := \

View file

@ -10,8 +10,6 @@
# This makefile compiles and runs each test twice. The first with
# GCC-built chibicc, and a second time with chibicc-built chibicc
ifneq ($(MODE), dbg)
ifneq ($(MODE), asan)
ifeq ($(ARCH), x86_64)
CHIBICC = o/$(MODE)/third_party/chibicc/chibicc.com
@ -51,13 +49,11 @@ THIRD_PARTY_CHIBICC_A_DIRECTDEPS = \
LIBC_FMT \
LIBC_INTRIN \
LIBC_LOG \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TIME \
LIBC_X \
@ -115,8 +111,6 @@ THIRD_PARTY_CHIBICC_CHECKS = $(foreach x,$(THIRD_PARTY_CHIBICC_ARTIFACTS),$($(x)
THIRD_PARTY_CHIBICC_OBJS = $(foreach x,$(THIRD_PARTY_CHIBICC_ARTIFACTS),$($(x)_OBJS))
$(THIRD_PARTY_CHIBICC_OBJS): $(BUILD_FILES) third_party/chibicc/chibicc.mk
endif
endif
endif
.PHONY: o/$(MODE)/third_party/chibicc

View file

@ -1,6 +1,7 @@
#include "third_party/chibicc/test/test.h"
int main() {
ASSERT(0, 0);
ASSERT(42, 42);
ASSERT(21, 5 + 20 - 4);

View file

@ -10,8 +10,6 @@
# This makefile compiles and runs each test twice. The first with
# GCC-built chibicc, and a second time with chibicc-built chibicc
ifneq ($(MODE), dbg)
ifneq ($(MODE), asan)
ifeq ($(ARCH), x86_64)
PKGS += THIRD_PARTY_CHIBICC_TEST
@ -46,7 +44,6 @@ THIRD_PARTY_CHIBICC_TEST_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_TINYMATH \
LIBC_X \
THIRD_PARTY_CHIBICC \
@ -79,8 +76,6 @@ o/$(MODE)/third_party/chibicc/test/%.o: \
o/$(MODE)/third_party/chibicc/test/int128_test.o: private QUOTA = -M1024m
endif
endif
endif
.PHONY: o/$(MODE)/third_party/chibicc/test

View file

@ -29,7 +29,6 @@ THIRD_PARTY_COMPILER_RT_A_CHECKS = \
THIRD_PARTY_COMPILER_RT_A_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_STUBS
THIRD_PARTY_COMPILER_RT_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_COMPILER_RT_A_DIRECTDEPS),$($(x))))

View file

@ -21,7 +21,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -22,7 +22,6 @@ THIRD_PARTY_CTAGS_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
THIRD_PARTY_MUSL \
THIRD_PARTY_REGEX

View file

@ -22,7 +22,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -21,7 +21,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -28,7 +28,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -27,7 +27,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -21,7 +21,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -37,7 +37,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -27,7 +27,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -40,7 +40,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -23,7 +23,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -24,7 +24,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -26,7 +26,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -23,7 +23,6 @@ THIRD_PARTY_DLMALLOC_A_DIRECTDEPS = \
LIBC_NEXGEN32E \
LIBC_RUNTIME \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS \
THIRD_PARTY_COMPILER_RT \

View file

@ -21,7 +21,6 @@ THIRD_PARTY_FINGER_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_DNS \
LIBC_SOCK \

View file

@ -22,7 +22,6 @@ THIRD_PARTY_GDTOA_A_DIRECTDEPS = \
LIBC_NEXGEN32E \
LIBC_RUNTIME \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TINYMATH

View file

@ -19,8 +19,7 @@ THIRD_PARTY_GETOPT_A_DIRECTDEPS = \
LIBC_CALLS \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_STR \
LIBC_STUBS
LIBC_STR
THIRD_PARTY_GETOPT_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_GETOPT_A_DIRECTDEPS),$($(x))))

View file

@ -63,7 +63,6 @@ THIRD_PARTY_GGML_A_DIRECTDEPS = \
LIBC_STDIO \
LIBC_THREAD \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TINYMATH \
THIRD_PARTY_COMPILER_RT
@ -133,7 +132,6 @@ THIRD_PARTY_GGML_LLAMA_DIRECTDEPS = \
LIBC_STDIO \
LIBC_LOG \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_THREAD \

View file

@ -25,7 +25,6 @@ THIRD_PARTY_HIREDIS_A_DIRECTDEPS = \
LIBC_SOCK \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TIME \
LIBC_X \

View file

@ -69,7 +69,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -37,7 +37,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h" /* for size_t */

View file

@ -35,7 +35,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"
@ -1148,7 +1147,6 @@ void sds_free(void *ptr) { s_free(ptr); }
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -14,7 +14,6 @@
#define _LIBCPP_BSD_LOCALE_FALLBACKS_DEFAULTS_H
#include "third_party/libcxx/stdlib.h"
#include "libc/mem/fmt.h"
#include "libc/str/unicode.h"
#include "libc/fmt/fmt.h"
#include "libc/str/locale.h"

View file

@ -12,6 +12,7 @@
#include "third_party/libcxx/__config"
#include "libc/calls/weirdtypes.h"
#include "libc/calls/calls.h"
#include "libc/isystem/time.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

View file

@ -189,7 +189,6 @@ THIRD_PARTY_LIBCXX_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TIME \
LIBC_THREAD \

View file

@ -28,7 +28,6 @@ THIRD_PARTY_LINENOISE_A_DIRECTDEPS = \
LIBC_LOG \
LIBC_SYSV_CALLS \
LIBC_STR \
LIBC_STUBS \
NET_HTTP
THIRD_PARTY_LINENOISE_A_DEPS := \

View file

@ -27,9 +27,9 @@
*/
#define lmathlib_c
#define LUA_LIB
#include "libc/calls/calls.h"
#include "libc/math.h"
#include "libc/nt/struct/msg.h"
#include "libc/time/time.h"
#include "third_party/lua/lauxlib.h"
#include "third_party/lua/lprefix.h"
#include "third_party/lua/lua.h"

View file

@ -27,9 +27,9 @@
*/
#define ltablib_c
#define LUA_LIB
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/str/str.h"
#include "libc/time/time.h"
#include "third_party/lua/lauxlib.h"
#include "third_party/lua/lprefix.h"
#include "third_party/lua/lua.h"

View file

@ -194,7 +194,6 @@ THIRD_PARTY_LUA_UNIX_DIRECTDEPS = \
LIBC_SOCK \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_THREAD \
LIBC_TIME \

View file

@ -52,7 +52,6 @@
#include "libc/limits.h"
#include "libc/log/log.h"
#include "libc/macros.internal.h"
#include "libc/mem/fmt.h"
#include "libc/mem/mem.h"
#include "libc/nt/runtime.h"
#include "libc/nt/synchronization.h"

View file

@ -26,7 +26,6 @@ THIRD_PARTY_MAXMIND_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV
THIRD_PARTY_MAXMIND_A_DEPS := \

View file

@ -1,6 +1,7 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_MBEDTLS_PLATFORM_H_
#define COSMOPOLITAN_THIRD_PARTY_MBEDTLS_PLATFORM_H_
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/likely.h"
#include "libc/mem/mem.h"

View file

@ -25,7 +25,6 @@ THIRD_PARTY_MUSL_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV
THIRD_PARTY_MUSL_A_DEPS := \

View file

@ -19,7 +19,6 @@ THIRD_PARTY_NSYNC_MEM_A_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_MEM \
LIBC_STUBS \
LIBC_SYSV \
THIRD_PARTY_NSYNC

View file

@ -29,7 +29,6 @@ THIRD_PARTY_NSYNC_A_DIRECTDEPS = \
LIBC_NT_KERNEL32 \
LIBC_NT_SYNCHRONIZATION \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS

View file

@ -25,7 +25,6 @@ THIRD_PARTY_NSYNC_TESTING_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_THREAD \
THIRD_PARTY_NSYNC \

View file

@ -19,8 +19,7 @@ THIRD_PARTY_PUFF_A_CHECKS = \
THIRD_PARTY_PUFF_A_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_STUBS
LIBC_NEXGEN32E
THIRD_PARTY_PUFF_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_PUFF_A_DIRECTDEPS),$($(x))))

View file

@ -460,7 +460,6 @@ THIRD_PARTY_PYTHON_STAGE1_A_DIRECTDEPS = \
LIBC_THREAD \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_TIME \
@ -1171,7 +1170,6 @@ THIRD_PARTY_PYTHON_STAGE2_A_DIRECTDEPS = \
LIBC_SOCK \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_TIME \
@ -3998,7 +3996,6 @@ THIRD_PARTY_PYTHON_PYTHON_DIRECTDEPS = \
LIBC_STDIO \
LIBC_MEM \
LIBC_STR \
LIBC_STUBS \
LIBC_LOG \
LIBC_SYSV \
LIBC_X \
@ -4050,7 +4047,6 @@ THIRD_PARTY_PYTHON_FREEZE_DIRECTDEPS = \
LIBC_MEM \
LIBC_STR \
LIBC_LOG \
LIBC_STUBS \
LIBC_SYSV \
LIBC_X \
THIRD_PARTY_GETOPT \

View file

@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/dce.h"
#include "libc/fmt/conv.h"
@ -32,7 +33,6 @@
#include "libc/runtime/stack.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/time/time.h"
#include "third_party/quickjs/cutils.h"
#include "third_party/quickjs/quickjs-libc.h"
#include "tool/args/args.h"

View file

@ -22,6 +22,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/conv.h"
@ -32,7 +33,6 @@
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/clock.h"
#include "libc/time/time.h"
#include "third_party/musl/ftw.h"
#include "third_party/quickjs/cutils.h"
#include "third_party/quickjs/list.h"

View file

@ -31,7 +31,6 @@ THIRD_PARTY_RADPAJAMA_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_THREAD \
LIBC_TINYMATH \
@ -84,7 +83,6 @@ THIRD_PARTY_RADPAJAMA_MAIN_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
THIRD_PARTY_GGML \
THIRD_PARTY_RADPAJAMA \
THIRD_PARTY_LIBCXX

View file

@ -20,8 +20,7 @@ THIRD_PARTY_REGEX_A_DIRECTDEPS = \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RUNTIME \
LIBC_STR \
LIBC_STUBS
LIBC_STR
THIRD_PARTY_REGEX_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_REGEX_A_DIRECTDEPS),$($(x))))

View file

@ -22,7 +22,6 @@ THIRD_PARTY_SED_A_DIRECTDEPS = \
LIBC_SYSV \
LIBC_STR \
LIBC_LOG \
LIBC_STUBS \
THIRD_PARTY_GETOPT \
THIRD_PARTY_REGEX

View file

@ -36,7 +36,6 @@ THIRD_PARTY_SMALLZ4_A_DIRECTDEPS = \
LIBC_CALLS \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
THIRD_PARTY_LIBCXX
THIRD_PARTY_SMALLZ4_A_DEPS := \

View file

@ -51,7 +51,6 @@ THIRD_PARTY_SQLITE3_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_THREAD \

View file

@ -34,7 +34,6 @@ THIRD_PARTY_STB_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_TINYMATH \
LIBC_X \
THIRD_PARTY_ZLIB

View file

@ -26,8 +26,7 @@ THIRD_PARTY_TIDY_A_DIRECTDEPS = \
LIBC_CALLS \
LIBC_STDIO \
LIBC_SYSV \
LIBC_STR \
LIBC_STUBS
LIBC_STR
THIRD_PARTY_TIDY_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_TIDY_A_DIRECTDEPS),$($(x))))

View file

@ -22,7 +22,6 @@ THIRD_PARTY_TR_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
THIRD_PARTY_GETOPT
THIRD_PARTY_TR_DEPS := \

View file

@ -22,7 +22,6 @@ THIRD_PARTY_UNZIP_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TIME \
LIBC_ZIPOS \

View file

@ -26,7 +26,6 @@ THIRD_PARTY_VQSORT_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
THIRD_PARTY_COMPILER_RT
THIRD_PARTY_VQSORT_A_DEPS := \

View file

@ -26,8 +26,7 @@ THIRD_PARTY_XED_A_CHECKS = \
THIRD_PARTY_XED_A_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_STR \
LIBC_STUBS
LIBC_STR
THIRD_PARTY_XED_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_XED_A_DIRECTDEPS),$($(x))))

View file

@ -224,7 +224,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -88,7 +88,6 @@
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -88,7 +88,6 @@ THIRD_PARTY_ZIP_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TIME \
LIBC_X \

View file

@ -957,10 +957,10 @@ int ZEXPORT deflate(strm, flush)
(s->gzhead->name == Z_NULL ? 0 : 8) +
(s->gzhead->comment == Z_NULL ? 0 : 16)
);
put_byte(s, (Byte)(s->gzhead->time & 0xff));
put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
put_byte(s, (Byte)(s->gzhead->time_ & 0xff));
put_byte(s, (Byte)((s->gzhead->time_ >> 8) & 0xff));
put_byte(s, (Byte)((s->gzhead->time_ >> 16) & 0xff));
put_byte(s, (Byte)((s->gzhead->time_ >> 24) & 0xff));
put_byte(s, s->level == 9 ? 2 :
(s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
4 : 0));

View file

@ -24,7 +24,6 @@ THIRD_PARTY_ZLIB_GZ_A_DIRECTDEPS = \
LIBC_NEXGEN32E \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
THIRD_PARTY_ZLIB

View file

@ -331,7 +331,6 @@ struct inflate_state FAR *state;
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"
#include "third_party/musl/tempnam.h"
@ -751,7 +750,7 @@ int flush;
case TIME:
NEEDBITS(32);
if (state->head != Z_NULL)
state->head->time = hold;
state->head->time_ = hold;
if ((state->flags & 0x0200) && (state->wrap & 4))
CRC4(state->check, hold);
INITBITS();

View file

@ -8,7 +8,6 @@
*/
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/fmt.h"
#include "libc/stdio/lock.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/temp.h"

View file

@ -171,7 +171,7 @@ typedef z_stream *z_streamp;
*/
typedef struct gz_header_s {
int text; /* true if compressed data believed to be text */
uLong time; /* modification time */
uLong time_; /* modification time */
int xflags; /* extra flags (not used when writing a gzip file) */
int os; /* operating system */
Bytef *extra; /* pointer to extra field or Z_NULL if none */

View file

@ -19,9 +19,8 @@ THIRD_PARTY_ZLIB_A_CHECKS = \
THIRD_PARTY_ZLIB_A_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_SYSV \
LIBC_STR \
LIBC_STUBS
LIBC_SYSV
THIRD_PARTY_ZLIB_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_ZLIB_A_DIRECTDEPS),$($(x))))