mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-17 16:10:29 +00:00
parent
2d64b9994b
commit
10fd8bdb70
1397 changed files with 1204 additions and 5031 deletions
2
third_party/bzip2/bzip2recover.c
vendored
2
third_party/bzip2/bzip2recover.c
vendored
|
@ -2,8 +2,10 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
/* clang-format off */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
1
third_party/bzip2/bzlib.c
vendored
1
third_party/bzip2/bzlib.c
vendored
|
@ -30,6 +30,7 @@
|
|||
*/
|
||||
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/bzip2/bzlib_private.inc"
|
||||
|
||||
|
||||
|
|
1
third_party/dlmalloc/dlmalloc.c
vendored
1
third_party/dlmalloc/dlmalloc.c
vendored
|
@ -13,6 +13,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/sysconf.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
#include "third_party/dlmalloc/dlmalloc.h"
|
||||
|
|
1
third_party/finger/display.c
vendored
1
third_party/finger/display.c
vendored
|
@ -39,6 +39,7 @@
|
|||
#include "libc/calls/termios.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
#include "third_party/finger/finger.h"
|
||||
|
|
3
third_party/finger/finger.c
vendored
3
third_party/finger/finger.c
vendored
|
@ -37,10 +37,13 @@
|
|||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nt/struct/msg.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/utmp.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sock/struct/sockaddr.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/finger/finger.h"
|
||||
|
|
2
third_party/finger/util.c
vendored
2
third_party/finger/util.c
vendored
|
@ -38,7 +38,9 @@
|
|||
#include "libc/calls/struct/stat.macros.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/paths.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "third_party/finger/finger.h"
|
||||
|
|
1
third_party/libcxx/__bsd_locale_fallbacks.h
vendored
1
third_party/libcxx/__bsd_locale_fallbacks.h
vendored
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "third_party/libcxx/stdlib.h"
|
||||
#include "libc/mem/fmt.h"
|
||||
#include "libc/unicode/unicode.h"
|
||||
#include "third_party/libcxx/memory"
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
|
|
1
third_party/libcxx/cstdlib
vendored
1
third_party/libcxx/cstdlib
vendored
|
@ -11,6 +11,7 @@
|
|||
#define _LIBCPP_CSTDLIB
|
||||
|
||||
#include "third_party/libcxx/__config"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/libcxx/stdlib.h"
|
||||
|
||||
/*
|
||||
|
|
2
third_party/lua/lauxlib.c
vendored
2
third_party/lua/lauxlib.c
vendored
|
@ -29,6 +29,8 @@
|
|||
#define LUA_LIB
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
|
|
1
third_party/lua/lbaselib.c
vendored
1
third_party/lua/lbaselib.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lbaselib_c
|
||||
#define LUA_LIB
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
|
|
1
third_party/lua/ldblib.c
vendored
1
third_party/lua/ldblib.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define ldblib_c
|
||||
#define LUA_LIB
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
|
|
1
third_party/lua/ldebug.c
vendored
1
third_party/lua/ldebug.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define ldebug_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lapi.h"
|
||||
#include "third_party/lua/lcode.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
|
|
1
third_party/lua/ldo.c
vendored
1
third_party/lua/ldo.c
vendored
|
@ -32,6 +32,7 @@
|
|||
#include "libc/runtime/gc.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lapi.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
|
|
1
third_party/lua/lgc.c
vendored
1
third_party/lua/lgc.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lgc_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
#include "third_party/lua/lfunc.h"
|
||||
|
|
2
third_party/lua/liolib.c
vendored
2
third_party/lua/liolib.c
vendored
|
@ -30,8 +30,10 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/stdio/lock.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/stdio/temp.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
|
|
2
third_party/lua/loadlib.c
vendored
2
third_party/lua/loadlib.c
vendored
|
@ -27,6 +27,8 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define loadlib_c
|
||||
#define LUA_LIB
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
|
|
1
third_party/lua/lobject.c
vendored
1
third_party/lua/lobject.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lobject_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lctype.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
|
|
1
third_party/lua/loslib.c
vendored
1
third_party/lua/loslib.c
vendored
|
@ -32,6 +32,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/temp.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/exit.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
|
|
1
third_party/lua/lparser.c
vendored
1
third_party/lua/lparser.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lparser_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/lcode.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
|
|
1
third_party/lua/lstate.c
vendored
1
third_party/lua/lstate.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lstate_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/lua/lapi.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
|
|
1
third_party/lua/lstring.c
vendored
1
third_party/lua/lstring.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lstring_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
#include "third_party/lua/lmem.h"
|
||||
|
|
1
third_party/lua/lstrlib.c
vendored
1
third_party/lua/lstrlib.c
vendored
|
@ -28,6 +28,7 @@
|
|||
#define lstrlib_c
|
||||
#define LUA_LIB
|
||||
#include "libc/math.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/cosmo.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
|
|
1
third_party/lua/ltablib.c
vendored
1
third_party/lua/ltablib.c
vendored
|
@ -28,6 +28,7 @@
|
|||
#define ltablib_c
|
||||
#define LUA_LIB
|
||||
#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"
|
||||
|
|
2
third_party/lua/luac.main.c
vendored
2
third_party/lua/luac.main.c
vendored
|
@ -30,6 +30,8 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/exit.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
|
|
1
third_party/lua/luaconf.h
vendored
1
third_party/lua/luaconf.h
vendored
|
@ -4,6 +4,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/unicode/unicode.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
|
||||
#define LUA_USE_POSIX
|
||||
|
|
2
third_party/lua/luaencodeurl.c
vendored
2
third_party/lua/luaencodeurl.c
vendored
|
@ -16,6 +16,8 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "net/http/url.h"
|
||||
#include "third_party/lua/cosmo.h"
|
||||
|
|
1
third_party/lua/luaprintstack.c
vendored
1
third_party/lua/luaprintstack.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "third_party/lua/cosmo.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
|
|
1
third_party/lua/luapushheader.c
vendored
1
third_party/lua/luapushheader.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "net/http/http.h"
|
||||
#include "third_party/lua/cosmo.h"
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
|
|
1
third_party/lua/luapushheaders.c
vendored
1
third_party/lua/luapushheaders.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "net/http/escape.h"
|
||||
#include "net/http/http.h"
|
||||
#include "third_party/lua/cosmo.h"
|
||||
|
|
1
third_party/lua/lundump.c
vendored
1
third_party/lua/lundump.c
vendored
|
@ -7,6 +7,7 @@
|
|||
#define lundump_c
|
||||
#define LUA_CORE
|
||||
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
#include "third_party/lua/lfunc.h"
|
||||
|
|
1
third_party/lua/lvm.c
vendored
1
third_party/lua/lvm.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lvm_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/ldebug.h"
|
||||
#include "third_party/lua/ldo.h"
|
||||
#include "third_party/lua/lfunc.h"
|
||||
|
|
1
third_party/lua/lzio.c
vendored
1
third_party/lua/lzio.c
vendored
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#define lzio_c
|
||||
#define LUA_CORE
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/lua/llimits.h"
|
||||
#include "third_party/lua/lmem.h"
|
||||
#include "third_party/lua/lprefix.h"
|
||||
|
|
2
third_party/make/error.c
vendored
2
third_party/make/error.c
vendored
|
@ -25,6 +25,8 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/make/stdio.h"
|
||||
|
||||
#if !_LIBC && ENABLE_NLS
|
||||
|
|
19
third_party/make/hash.c
vendored
19
third_party/make/hash.c
vendored
|
@ -414,24 +414,6 @@ jhash(unsigned const char *k, int length)
|
|||
|
||||
#define UINTSZ sizeof (unsigned int)
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
/* The ifs are ordered from the first byte in memory to the last. */
|
||||
#define sum_up_to_nul(r, p, plen, flag) \
|
||||
do { \
|
||||
unsigned int val = 0; \
|
||||
size_t pn = (plen); \
|
||||
size_t n = pn < UINTSZ ? pn : UINTSZ; \
|
||||
memcpy (&val, (p), n); \
|
||||
if ((val & 0xFF000000) == 0) \
|
||||
flag = 1; \
|
||||
else if ((val & 0xFF0000) == 0) \
|
||||
r += val & ~0xFFFF, flag = 1; \
|
||||
else if ((val & 0xFF00) == 0) \
|
||||
r += val & ~0xFF, flag = 1; \
|
||||
else \
|
||||
r += val, flag = (val & 0xFF) == 0; \
|
||||
} while (0)
|
||||
#else
|
||||
/* First detect the presence of zeroes. If there is none, we can
|
||||
sum the 4 bytes directly. Otherwise, the ifs are ordered as in the
|
||||
big endian case, from the first byte in memory to the last. */
|
||||
|
@ -454,7 +436,6 @@ jhash(unsigned const char *k, int length)
|
|||
r += val; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
unsigned int
|
||||
jhash_string(unsigned const char *k)
|
||||
|
|
3
third_party/make/make.mk
vendored
3
third_party/make/make.mk
vendored
|
@ -74,8 +74,6 @@ THIRD_PARTY_MAKE_SRCS_LIB = \
|
|||
third_party/make/xmalloc.c
|
||||
|
||||
THIRD_PARTY_MAKE_SRCS_BASE = \
|
||||
third_party/make/ar.c \
|
||||
third_party/make/arscan.c \
|
||||
third_party/make/commands.c \
|
||||
third_party/make/default.c \
|
||||
third_party/make/dir.c \
|
||||
|
@ -164,6 +162,7 @@ o/$(MODE)/third_party/make/hash.o: private \
|
|||
|
||||
$(THIRD_PARTY_MAKE_OBJS): private \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-DNO_ARCHIVES \
|
||||
-DSTACK_FRAME_UNLIMITED \
|
||||
-DHAVE_CONFIG_H \
|
||||
-DINCLUDEDIR=\".\" \
|
||||
|
|
2
third_party/maxmind/maxminddb.c
vendored
2
third_party/maxmind/maxminddb.c
vendored
|
@ -26,8 +26,10 @@
|
|||
#include "libc/inttypes.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/struct/sockaddr6.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
|
|
1
third_party/mbedtls/aes.c
vendored
1
third_party/mbedtls/aes.c
vendored
|
@ -17,6 +17,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/aesni.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
1
third_party/mbedtls/asn1.h
vendored
1
third_party/mbedtls/asn1.h
vendored
|
@ -1,5 +1,6 @@
|
|||
#ifndef MBEDTLS_ASN1_H
|
||||
#define MBEDTLS_ASN1_H
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
/* clang-format off */
|
||||
|
|
1
third_party/mbedtls/asn1parse.c
vendored
1
third_party/mbedtls/asn1parse.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
1
third_party/mbedtls/asn1write.c
vendored
1
third_party/mbedtls/asn1write.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/asn1write.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/base64.c
vendored
1
third_party/mbedtls/base64.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/base64.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
|
|
1
third_party/mbedtls/bignum.c
vendored
1
third_party/mbedtls/bignum.c
vendored
|
@ -26,6 +26,7 @@
|
|||
#include "libc/nexgen32e/nexgen32e.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum_internal.h"
|
||||
#include "third_party/mbedtls/chk.h"
|
||||
|
|
1
third_party/mbedtls/ccm.c
vendored
1
third_party/mbedtls/ccm.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/chacha20.c
vendored
1
third_party/mbedtls/chacha20.c
vendored
|
@ -17,6 +17,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/chachapoly.c
vendored
1
third_party/mbedtls/chachapoly.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/chachapoly.h"
|
||||
#include "third_party/mbedtls/chk.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
1
third_party/mbedtls/cipher.c
vendored
1
third_party/mbedtls/cipher.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/chachapoly.h"
|
||||
|
|
1
third_party/mbedtls/debug.c
vendored
1
third_party/mbedtls/debug.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/debug.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/dhm.c
vendored
1
third_party/mbedtls/dhm.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
1
third_party/mbedtls/ecdh_everest.c
vendored
1
third_party/mbedtls/ecdh_everest.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/ecdh_everest.h"
|
||||
#include "third_party/mbedtls/everest.h"
|
||||
#if defined(MBEDTLS_ECDH_C) && defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
|
||||
|
|
1
third_party/mbedtls/ecdsa.c
vendored
1
third_party/mbedtls/ecdsa.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/asn1write.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/ecdsa.h"
|
||||
|
|
1
third_party/mbedtls/ecp.c
vendored
1
third_party/mbedtls/ecp.c
vendored
|
@ -20,6 +20,7 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum_internal.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
1
third_party/mbedtls/ecp256.c
vendored
1
third_party/mbedtls/ecp256.c
vendored
|
@ -21,6 +21,7 @@
|
|||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/runtime/gc.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/bignum_internal.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/ecp_internal.h"
|
||||
|
|
1
third_party/mbedtls/ecp384.c
vendored
1
third_party/mbedtls/ecp384.c
vendored
|
@ -22,6 +22,7 @@
|
|||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/runtime/gc.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/bignum_internal.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/ecp_internal.h"
|
||||
|
|
1
third_party/mbedtls/ecp_curves.c
vendored
1
third_party/mbedtls/ecp_curves.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/entropy.c
vendored
1
third_party/mbedtls/entropy.c
vendored
|
@ -17,6 +17,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/entropy_poll.h"
|
||||
|
|
1
third_party/mbedtls/error.c
vendored
1
third_party/mbedtls/error.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/base64.h"
|
||||
|
|
1
third_party/mbedtls/md.c
vendored
1
third_party/mbedtls/md.c
vendored
|
@ -18,6 +18,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/blake2.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
|
1
third_party/mbedtls/md5.c
vendored
1
third_party/mbedtls/md5.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
|
1
third_party/mbedtls/nist_kw.c
vendored
1
third_party/mbedtls/nist_kw.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/endian.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/oid.c
vendored
1
third_party/mbedtls/oid.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/oid.h"
|
||||
|
|
1
third_party/mbedtls/param.c
vendored
1
third_party/mbedtls/param.c
vendored
|
@ -20,6 +20,7 @@
|
|||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
|
||||
void mbedtls_param_failed(const char *msg, const char *file, int line) {
|
||||
|
|
1
third_party/mbedtls/pem.c
vendored
1
third_party/mbedtls/pem.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/base64.h"
|
||||
#include "third_party/mbedtls/chk.h"
|
||||
|
|
1
third_party/mbedtls/pk_wrap.c
vendored
1
third_party/mbedtls/pk_wrap.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/asn1write.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
1
third_party/mbedtls/test/everest_test.c
vendored
1
third_party/mbedtls/test/everest_test.c
vendored
|
@ -18,6 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/rand/rand.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
|
|
1
third_party/python/Include/pydebug.h
vendored
1
third_party/python/Include/pydebug.h
vendored
|
@ -3,6 +3,7 @@
|
|||
#define Py_PYDEBUG_H
|
||||
COSMOPOLITAN_C_START_
|
||||
/* clang-format off */
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
/* These global variable are defined in pylifecycle.c */
|
||||
/* XXX (ncoghlan): move these declarations to pylifecycle.h? */
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/unicode/locale.h"
|
||||
#include "libc/unicode/unicode.h"
|
||||
#include "third_party/python/Modules/_decimal/libmpdec/bits.h"
|
||||
#include "third_party/python/Modules/_decimal/libmpdec/constants.h"
|
||||
#include "third_party/python/Modules/_decimal/libmpdec/io.h"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
│ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, │
|
||||
│ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/python/Modules/_decimal/libmpdec/mpalloc.h"
|
||||
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
|
||||
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "libc/inttypes.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "third_party/python/pyconfig.h"
|
||||
COSMOPOLITAN_C_START_
|
||||
|
|
1
third_party/python/Modules/_localemodule.c
vendored
1
third_party/python/Modules/_localemodule.c
vendored
|
@ -7,6 +7,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "libc/unicode/langinfo.h"
|
||||
#include "libc/unicode/locale.h"
|
||||
#include "libc/unicode/unicode.h"
|
||||
#include "third_party/python/Include/dictobject.h"
|
||||
#include "third_party/python/Include/fileutils.h"
|
||||
#include "third_party/python/Include/import.h"
|
||||
|
|
1
third_party/python/Modules/_testcapimodule.c
vendored
1
third_party/python/Modules/_testcapimodule.c
vendored
|
@ -12,6 +12,7 @@
|
|||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/python/Include/abstract.h"
|
||||
|
|
1
third_party/python/Modules/_tracemalloc.c
vendored
1
third_party/python/Modules/_tracemalloc.c
vendored
|
@ -6,6 +6,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/python/Include/boolobject.h"
|
||||
#include "third_party/python/Include/dictobject.h"
|
||||
#include "third_party/python/Include/fileutils.h"
|
||||
|
|
1
third_party/python/Modules/expat/xmlparse.c
vendored
1
third_party/python/Modules/expat/xmlparse.c
vendored
|
@ -3,6 +3,7 @@
|
|||
#include "libc/calls/struct/timeval.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/rdtsc.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/rand/rand.h"
|
||||
|
|
1
third_party/python/Modules/resource.c
vendored
1
third_party/python/Modules/resource.c
vendored
|
@ -9,6 +9,7 @@
|
|||
#include "libc/calls/struct/rusage.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/rlim.h"
|
||||
#include "libc/sysv/consts/rlimit.h"
|
||||
#include "libc/sysv/consts/rusage.h"
|
||||
|
|
1
third_party/python/Objects/fileobject.c
vendored
1
third_party/python/Objects/fileobject.c
vendored
|
@ -7,6 +7,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/stdio/lock.h"
|
||||
#include "third_party/python/Include/abstract.h"
|
||||
#include "third_party/python/Include/boolobject.h"
|
||||
#include "third_party/python/Include/bytesobject.h"
|
||||
|
|
1
third_party/python/Objects/obmalloc.c
vendored
1
third_party/python/Objects/obmalloc.c
vendored
|
@ -10,6 +10,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/intrin/asan.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
|
|
1
third_party/python/Parser/acceler.c
vendored
1
third_party/python/Parser/acceler.c
vendored
|
@ -4,6 +4,7 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/python/Include/grammar.h"
|
||||
#include "third_party/python/Include/node.h"
|
||||
#include "third_party/python/Include/objimpl.h"
|
||||
|
|
1
third_party/python/Parser/grammar.c
vendored
1
third_party/python/Parser/grammar.c
vendored
|
@ -4,6 +4,7 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/python/Include/grammar.h"
|
||||
#include "third_party/python/Include/objimpl.h"
|
||||
#include "third_party/python/Include/pgenheaders.h"
|
||||
|
|
58
third_party/python/Python/cosmomodule.c
vendored
58
third_party/python/Python/cosmomodule.c
vendored
|
@ -19,7 +19,9 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "dsp/scale/cdecimate2xuint8x8.h"
|
||||
#include "libc/bits/popcnt.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/mem.h"
|
||||
|
@ -27,6 +29,7 @@
|
|||
#include "libc/nexgen32e/rdtsc.h"
|
||||
#include "libc/nexgen32e/rdtscp.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/python/Include/abstract.h"
|
||||
#include "third_party/python/Include/import.h"
|
||||
#include "third_party/python/Include/longobject.h"
|
||||
|
@ -187,6 +190,59 @@ cosmo_popcount(PyObject *self, PyObject *args)
|
|||
return PyLong_FromSize_t(_countbits(p, n));
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(pledge_doc,
|
||||
"pledge($module, promises, execpromises)\n\
|
||||
--\n\n\
|
||||
Permits syscall operations, e.g.\n\
|
||||
\n\
|
||||
>>> cosmo.pledge('stdio rpath tty', None)\n\
|
||||
\n\
|
||||
This function implements the OpenBSD pledge() API for\n\
|
||||
OpenBSD and Linux, where we use SECCOMP BPF. Read the\n\
|
||||
Cosmopolitan Libc documentation to learn more.");
|
||||
|
||||
static PyObject *
|
||||
cosmo_pledge(PyObject *self, PyObject *args)
|
||||
{
|
||||
int e = errno;
|
||||
const char *x, *y;
|
||||
if (!PyArg_ParseTuple(args, "sz:pledge", &x, &y)) return 0;
|
||||
if (!pledge(x, y)) {
|
||||
Py_RETURN_NONE;
|
||||
} else {
|
||||
PyErr_SetString(PyExc_SystemError, strerror(errno));
|
||||
errno = e;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(unveil_doc,
|
||||
"unveil($module, path, permissions)\n\
|
||||
--\n\n\
|
||||
Permits filesystem operations, e.g.\n\
|
||||
\n\
|
||||
>>> cosmo.unveil('.', 'rwcx')\n\
|
||||
>>> cosmo.unveil(None, None)\n\
|
||||
\n\
|
||||
This function implements the OpenBSD unveil() API for\n\
|
||||
OpenBSD and Linux where we use Landlock LSM. Read the\n\
|
||||
Cosmopolitan Libc documentation to learn more.");
|
||||
|
||||
static PyObject *
|
||||
cosmo_unveil(PyObject *self, PyObject *args)
|
||||
{
|
||||
int e = errno;
|
||||
const char *x, *y;
|
||||
if (!PyArg_ParseTuple(args, "zz:unveil", &x, &y)) return 0;
|
||||
if (!unveil(x, y)) {
|
||||
Py_RETURN_NONE;
|
||||
} else {
|
||||
PyErr_SetString(PyExc_SystemError, strerror(errno));
|
||||
errno = e;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(exit1_doc,
|
||||
"exit1($module)\n\
|
||||
--\n\n\
|
||||
|
@ -269,6 +325,8 @@ static PyMethodDef cosmo_methods[] = {
|
|||
{"exit1", cosmo_exit1, METH_NOARGS, exit1_doc},
|
||||
{"rdtsc", cosmo_rdtsc, METH_NOARGS, rdtsc_doc},
|
||||
{"crc32c", cosmo_crc32c, METH_VARARGS, crc32c_doc},
|
||||
{"pledge", cosmo_pledge, METH_VARARGS, pledge_doc},
|
||||
{"unveil", cosmo_unveil, METH_VARARGS, unveil_doc},
|
||||
{"syscount", cosmo_syscount, METH_NOARGS, syscount_doc},
|
||||
{"popcount", cosmo_popcount, METH_VARARGS, popcount_doc},
|
||||
{"decimate", cosmo_decimate, METH_VARARGS, decimate_doc},
|
||||
|
|
1
third_party/python/Python/dtoa.c
vendored
1
third_party/python/Python/dtoa.c
vendored
|
@ -7,6 +7,7 @@
|
|||
#include "libc/assert.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/python/Include/pymem.h"
|
||||
#include "third_party/python/Include/pyport.h"
|
||||
/* clang-format off */
|
||||
|
|
1
third_party/python/Python/errors.c
vendored
1
third_party/python/Python/errors.c
vendored
|
@ -5,6 +5,7 @@
|
|||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/errno.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nt/enum/formatmessageflags.h"
|
||||
#include "libc/nt/enum/lang.h"
|
||||
#include "libc/nt/memory.h"
|
||||
|
|
1
third_party/python/Python/fileutils.c
vendored
1
third_party/python/Python/fileutils.c
vendored
|
@ -15,6 +15,7 @@
|
|||
#include "libc/sysv/consts/fio.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/unicode/locale.h"
|
||||
#include "libc/unicode/unicode.h"
|
||||
#include "third_party/python/Include/bytesobject.h"
|
||||
#include "third_party/python/Include/ceval.h"
|
||||
#include "third_party/python/Include/fileutils.h"
|
||||
|
|
5
third_party/python/Python/import.c
vendored
5
third_party/python/Python/import.c
vendored
|
@ -11,14 +11,15 @@
|
|||
#include "libc/calls/struct/stat.macros.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/gc.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/s.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "third_party/python/Include/Python-ast.h"
|
||||
#include "third_party/python/Include/abstract.h"
|
||||
#include "third_party/python/Include/boolobject.h"
|
||||
#include "third_party/python/Include/bltinmodule.h"
|
||||
#include "third_party/python/Include/boolobject.h"
|
||||
#include "third_party/python/Include/ceval.h"
|
||||
#include "third_party/python/Include/code.h"
|
||||
#include "third_party/python/Include/dictobject.h"
|
||||
|
|
1
third_party/python/freeze.c
vendored
1
third_party/python/freeze.c
vendored
|
@ -5,6 +5,7 @@
|
|||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/python/Include/bytesobject.h"
|
||||
#include "third_party/python/Include/compile.h"
|
||||
#include "third_party/python/Include/fileutils.h"
|
||||
|
|
1
third_party/python/launch.c
vendored
1
third_party/python/launch.c
vendored
|
@ -9,6 +9,7 @@
|
|||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
|
2
third_party/python/python.mk
vendored
2
third_party/python/python.mk
vendored
|
@ -4448,7 +4448,7 @@ o/$(MODE)/third_party/python/chibicc.inc: \
|
|||
third_party/python/Include/warnings.h \
|
||||
third_party/python/Include/weakrefobject.h \
|
||||
third_party/python/pyconfig.h
|
||||
@$(COMPILE) -ACHECK.h $(COMPILE.c) -xc -E -P -fdirectives-only -dD -D__chibicc__ -o $@ $<
|
||||
@$(COMPILE) -wACHECK.h $(COMPILE.c) -xc -E -P -fdirectives-only -dD -D__chibicc__ -o $@ $<
|
||||
|
||||
################################################################################
|
||||
# HELLO.COM
|
||||
|
|
1
third_party/quickjs/array.c
vendored
1
third_party/quickjs/array.c
vendored
|
@ -22,6 +22,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
2
third_party/quickjs/atof.c
vendored
2
third_party/quickjs/atof.c
vendored
|
@ -23,6 +23,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
|
|
1
third_party/quickjs/atom.c
vendored
1
third_party/quickjs/atom.c
vendored
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
#include "third_party/quickjs/libregexp.h"
|
||||
#include "third_party/quickjs/quickjs.h"
|
||||
|
|
2
third_party/quickjs/bigdecimal.c
vendored
2
third_party/quickjs/bigdecimal.c
vendored
|
@ -22,6 +22,8 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
1
third_party/quickjs/bigint.c
vendored
1
third_party/quickjs/bigint.c
vendored
|
@ -23,6 +23,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
2
third_party/quickjs/byte.c
vendored
2
third_party/quickjs/byte.c
vendored
|
@ -23,6 +23,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
#include "third_party/quickjs/leb128.h"
|
||||
#include "third_party/quickjs/libregexp.h"
|
||||
|
|
2
third_party/quickjs/dbuf.c
vendored
2
third_party/quickjs/dbuf.c
vendored
|
@ -23,6 +23,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
#include "third_party/quickjs/libregexp.h"
|
||||
#include "third_party/quickjs/quickjs.h"
|
||||
|
|
1
third_party/quickjs/float.c
vendored
1
third_party/quickjs/float.c
vendored
|
@ -22,6 +22,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
1
third_party/quickjs/gc.c
vendored
1
third_party/quickjs/gc.c
vendored
|
@ -23,6 +23,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
1
third_party/quickjs/gen.c
vendored
1
third_party/quickjs/gen.c
vendored
|
@ -23,6 +23,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
1
third_party/quickjs/json.c
vendored
1
third_party/quickjs/json.c
vendored
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
#include "third_party/quickjs/libregexp.h"
|
||||
#include "third_party/quickjs/quickjs.h"
|
||||
|
|
1
third_party/quickjs/libbf.c
vendored
1
third_party/quickjs/libbf.c
vendored
|
@ -25,6 +25,7 @@
|
|||
#include "libc/bits/avxintrin.internal.h"
|
||||
#include "libc/bits/likely.h"
|
||||
#include "libc/inttypes.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/cutils.h"
|
||||
|
|
1
third_party/quickjs/libregexp.c
vendored
1
third_party/quickjs/libregexp.c
vendored
|
@ -26,6 +26,7 @@
|
|||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/alloca.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/cutils.h"
|
||||
|
|
2
third_party/quickjs/libunicode.c
vendored
2
third_party/quickjs/libunicode.c
vendored
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/cutils.h"
|
||||
|
|
2
third_party/quickjs/parse.c
vendored
2
third_party/quickjs/parse.c
vendored
|
@ -24,6 +24,8 @@
|
|||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/quickjs/internal.h"
|
||||
#include "third_party/quickjs/libregexp.h"
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue