Make Cosmopolitan ANSI C89 compatible

You can now use cosmopolitan.h with an ANSI C89 compiler like MSVC. The
Cosmopolitan codebase itself won't support being compiled that way. But
you can build objects that link against Cosmopolitan using any compiler
and you can furthermore use tools like IntelliSense that can't even GNU

See also #40
This commit is contained in:
Justine Tunney 2021-02-03 17:48:59 -08:00
parent 46085797b6
commit a8d7195777
34 changed files with 262 additions and 9561 deletions

View file

@ -135,7 +135,6 @@ include dsp/tty/tty.mk # ├──ONLINE RUNTIME
include libc/dns/dns.mk # │ You can communicate with the network
include libc/crypto/crypto.mk # │
include net/http/http.mk #─┘
include third_party/lemon/lemon.mk
include third_party/duktape/duktape.mk
include third_party/regex/regex.mk
include third_party/third_party.mk
@ -149,7 +148,6 @@ include third_party/chibicc/test/test.mk
include tool/build/emucrt/emucrt.mk
include tool/build/emubin/emubin.mk
include tool/build/build.mk
include tool/calc/calc.mk
include tool/decode/lib/decodelib.mk
include tool/decode/decode.mk
include tool/hash/hash.mk
@ -328,6 +326,14 @@ o/cosmopolitan.html: \
-fno-common -include libc/integral/normalize.inc -o $@ \
$(filter-out %.s,$(foreach x,$(COSMOPOLITAN_OBJECTS),$($(x)_SRCS)))
$(SRCS): \
libc/integral/normalize.inc \
libc/integral/c.inc \
libc/integral/cxx.inc \
libc/integral/cxxtypescompat.inc \
libc/integral/lp64arg.inc \
libc/integral/lp64.inc
# UNSPECIFIED PREREQUISITES TUTORIAL
#
# A build rule must exist for all files that make needs to consider in