diff --git a/examples/compress.c b/examples/compress.c index dd7cc53be..f299ecee1 100644 --- a/examples/compress.c +++ b/examples/compress.c @@ -19,7 +19,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/zlib/zlib.h" #define CHUNK 32768 diff --git a/examples/datauri.c b/examples/datauri.c index 70c24db19..a8afe6a6d 100644 --- a/examples/datauri.c +++ b/examples/datauri.c @@ -14,7 +14,7 @@ #include "libc/x/x.h" #include "net/http/escape.h" #include "net/http/http.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/stb/stb_image.h" #define USAGE \ diff --git a/examples/getrandom.c b/examples/getrandom.c index 6a9f09207..d3003e3f9 100644 --- a/examples/getrandom.c +++ b/examples/getrandom.c @@ -29,7 +29,7 @@ #include "libc/sysv/consts/grnd.h" #include "libc/sysv/consts/sig.h" #include "libc/testlib/hyperion.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define B 4096 diff --git a/examples/img.c b/examples/img.c index 621b77c78..91e573a7c 100644 --- a/examples/img.c +++ b/examples/img.c @@ -16,7 +16,7 @@ #include "libc/x/xasprintf.h" #include "net/http/escape.h" #include "net/http/http.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/stb/stb_image.h" #define USAGE \ diff --git a/examples/nc.c b/examples/nc.c index 650c46078..c90c2aa1b 100644 --- a/examples/nc.c +++ b/examples/nc.c @@ -25,7 +25,7 @@ #include "libc/sysv/consts/so.h" #include "libc/sysv/consts/sock.h" #include "libc/sysv/consts/sol.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" /** * @fileoverview netcat clone diff --git a/examples/nesemu1.cc b/examples/nesemu1.cc index e3984adfb..d83b7666d 100644 --- a/examples/nesemu1.cc +++ b/examples/nesemu1.cc @@ -44,7 +44,6 @@ #include "libc/x/xsigaction.h" #include "libc/zip.internal.h" #include "libc/zipos/zipos.internal.h" -#include "third_party/getopt/getopt.h" #include "third_party/libcxx/vector" #include "tool/viz/lib/knobs.h" diff --git a/examples/script.c b/examples/script.c index eae4f65b1..e6940d25a 100644 --- a/examples/script.c +++ b/examples/script.c @@ -52,7 +52,7 @@ #include "libc/sysv/consts/s.h" #include "libc/sysv/consts/termios.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" // clang-format off /** diff --git a/examples/wall.c b/examples/wall.c index 95287f59c..1d7500601 100644 --- a/examples/wall.c +++ b/examples/wall.c @@ -18,7 +18,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/o.h" #include "libc/time/struct/tm.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/passwd.h" /** diff --git a/examples/whois.c b/examples/whois.c index 39cf65e91..d61fd0f5e 100644 --- a/examples/whois.c +++ b/examples/whois.c @@ -42,7 +42,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/poll.h" #include "libc/sysv/consts/sock.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" // clang-format off asm(".ident\t\"\\n\\n\ diff --git a/libc/calls/tailcontext.S b/libc/calls/tailcontext.S index 01dcba312..945ecc840 100644 --- a/libc/calls/tailcontext.S +++ b/libc/calls/tailcontext.S @@ -40,22 +40,23 @@ __tailcontext: movaps 0x60(%rax),%xmm14 movaps 0x70(%rax),%xmm15 - mov 40(%rdi),%r8 - mov 48(%rdi),%r9 - mov 56(%rdi),%r10 - mov 64(%rdi),%r11 - mov 72(%rdi),%r12 - mov 80(%rdi),%r13 - mov 88(%rdi),%r14 - mov 96(%rdi),%r15 - mov 112(%rdi),%rsi - mov 120(%rdi),%rbp - mov 128(%rdi),%rbx - mov 136(%rdi),%rdx - mov 152(%rdi),%rcx - mov 160(%rdi),%rsp - push 168(%rdi) - mov 104(%rdi),%rdi + lea 80(%rdi),%rax + mov -40(%rax),%r8 + mov -32(%rax),%r9 + mov -24(%rax),%r10 + mov -16(%rax),%r11 + mov -8(%rax),%r12 + mov 0(%rax),%r13 + mov 8(%rax),%r14 + mov 16(%rax),%r15 + mov 32(%rax),%rsi + mov 40(%rax),%rbp + mov 48(%rax),%rbx + mov 56(%rax),%rdx + mov 72(%rax),%rcx + mov 80(%rax),%rsp + push 88(%rax) + mov 24(%rax),%rdi xor %eax,%eax ret diff --git a/libc/elf/struct/rel.h b/libc/elf/struct/rel.h index d9c3e2f4b..725d27bcc 100644 --- a/libc/elf/struct/rel.h +++ b/libc/elf/struct/rel.h @@ -43,7 +43,7 @@ typedef struct Elf64_Rel { * * Each relocation type specifies a mathematical formula that's used * to compute the appropriate value for the fixed-up object code. If - * if needs an addend, then this struct doesn't have one, but it can + * it needs an addend, then this struct doesn't have one, but it can * still be embedded by the compiler in the location to be modified. */ Elf64_Xword r_info; diff --git a/libc/isystem/getopt.h b/libc/isystem/getopt.h index 168e1c766..0e3dffed4 100644 --- a/libc/isystem/getopt.h +++ b/libc/isystem/getopt.h @@ -1,5 +1,4 @@ #ifndef _GETOPT_H #define _GETOPT_H -#include "third_party/getopt/getopt.h" #include "third_party/getopt/long.h" #endif /* _GETOPT_H */ diff --git a/libc/isystem/stdlib.h b/libc/isystem/stdlib.h index 95956671e..7365e7bb9 100644 --- a/libc/isystem/stdlib.h +++ b/libc/isystem/stdlib.h @@ -13,7 +13,7 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/long.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #endif /* _STDLIB_H */ diff --git a/libc/isystem/unistd.h b/libc/isystem/unistd.h index 3f3e74f05..0e991910b 100644 --- a/libc/isystem/unistd.h +++ b/libc/isystem/unistd.h @@ -10,7 +10,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/long.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" #endif /* _UNISTD_H */ diff --git a/libc/stdckdint.h b/libc/stdckdint.h index 35b5de0a6..ad6221bea 100644 --- a/libc/stdckdint.h +++ b/libc/stdckdint.h @@ -60,9 +60,8 @@ ? __ckd_##op##ll((__ckd_dword *)(res), (x), (y)) \ : __ckd_trap())) -__funline int __ckd_trap(void) { - volatile int __x = 0; - return 1 / __x; +__funline wontreturn int __ckd_trap(void) { + *(volatile int *)0 = 0; } /* diff --git a/libc/testlib/testmain.c b/libc/testlib/testmain.c index 75f92c486..538b7f267 100644 --- a/libc/testlib/testmain.c +++ b/libc/testlib/testmain.c @@ -56,7 +56,7 @@ #include "libc/sysv/consts/sig.h" #include "libc/testlib/testlib.h" #include "third_party/dlmalloc/dlmalloc.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " [FLAGS]\n\ diff --git a/net/turfwar/blackholed.c b/net/turfwar/blackholed.c index 91043e1c4..7ffc211c3 100644 --- a/net/turfwar/blackholed.c +++ b/net/turfwar/blackholed.c @@ -47,7 +47,7 @@ #include "libc/time/struct/tm.h" #include "net/http/http.h" #include "net/http/ip.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/passwd.h" #define LOG(FMT, ...) \ diff --git a/net/turfwar/turfwar.c b/net/turfwar/turfwar.c index a9f62f323..9a4f7ce67 100644 --- a/net/turfwar/turfwar.c +++ b/net/turfwar/turfwar.c @@ -79,7 +79,7 @@ #include "net/http/ip.h" #include "net/http/tokenbucket.h" #include "net/http/url.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/nsync/counter.h" #include "third_party/nsync/cv.h" #include "third_party/nsync/mu.h" diff --git a/third_party/ctags/entry.c b/third_party/ctags/entry.c index 246505097..83d083268 100644 --- a/third_party/ctags/entry.c +++ b/third_party/ctags/entry.c @@ -45,7 +45,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* to declare close (), ftruncate (), truncate () */ #endif diff --git a/third_party/ctags/options.c b/third_party/ctags/options.c index 04bb5fb88..b70659074 100644 --- a/third_party/ctags/options.c +++ b/third_party/ctags/options.c @@ -28,7 +28,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #include "libc/mem/alg.h" diff --git a/third_party/ctags/sort.c b/third_party/ctags/sort.c index 6b1b2e039..39922ec03 100644 --- a/third_party/ctags/sort.c +++ b/third_party/ctags/sort.c @@ -30,7 +30,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* to declare malloc () */ #endif diff --git a/third_party/ctags/vstring.h b/third_party/ctags/vstring.h index b3e7408dd..9d13c60b1 100644 --- a/third_party/ctags/vstring.h +++ b/third_party/ctags/vstring.h @@ -31,7 +31,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* to define size_t */ #endif diff --git a/third_party/finger/finger.c b/third_party/finger/finger.c index 1dfa12a30..ee7391f1b 100644 --- a/third_party/finger/finger.c +++ b/third_party/finger/finger.c @@ -47,7 +47,7 @@ #include "libc/sysv/consts/fileno.h" #include "libc/time/time.h" #include "third_party/finger/finger.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/passwd.h" // clang-format off diff --git a/third_party/getopt/getopt.c b/third_party/getopt/getopt.c index 91661c503..e6570fa46 100644 --- a/third_party/getopt/getopt.c +++ b/third_party/getopt/getopt.c @@ -34,6 +34,7 @@ #include "libc/calls/calls.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" +#include "third_party/getopt/getopt.internal.h" asm(".ident\t\"\\n\ getopt (BSD-3)\\n\ diff --git a/third_party/getopt/getopt.h b/third_party/getopt/getopt.h deleted file mode 100644 index 72139ce34..000000000 --- a/third_party/getopt/getopt.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_ -#define COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_ -#if !(__ASSEMBLER__ + __LINKER__ + 0) -COSMOPOLITAN_C_START_ - -extern char *optarg; -extern int optind, opterr, optopt, optreset; - -int getopt(int, char *const[], const char *) paramsnonnull(); -int getsubopt(char **, char *const *, char **) paramsnonnull(); - -COSMOPOLITAN_C_END_ -#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_ */ diff --git a/third_party/getopt/getopt.internal.h b/third_party/getopt/getopt.internal.h new file mode 100644 index 000000000..33c58323b --- /dev/null +++ b/third_party/getopt/getopt.internal.h @@ -0,0 +1,25 @@ +#ifndef COSMOPOLITAN_GETOPT_H_ +#define COSMOPOLITAN_GETOPT_H_ +#ifdef COSMOPOLITAN_GETOPT_LONG_H_ +#error "don't mix getopt_long() with cosmo's getopt()" +#endif + +#define optarg __optarg +#define optind __optind +#define opterr __opterr +#define optopt __optopt +#define optreset __optreset +#define getopt __getopt + +#if !(__ASSEMBLER__ + __LINKER__ + 0) +COSMOPOLITAN_C_START_ + +extern char *optarg; +extern int optind, opterr, optopt, optreset; + +int getopt(int, char *const[], const char *) paramsnonnull(); +int getsubopt(char **, char *const *, char **) paramsnonnull(); + +COSMOPOLITAN_C_END_ +#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ +#endif /* COSMOPOLITAN_GETOPT_H_ */ diff --git a/third_party/getopt/getsubopt.c b/third_party/getopt/getsubopt.c index e1309ff85..65448ff41 100644 --- a/third_party/getopt/getsubopt.c +++ b/third_party/getopt/getsubopt.c @@ -29,7 +29,7 @@ │ SUCH DAMAGE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" // clang-format off /* diff --git a/third_party/getopt/long.h b/third_party/getopt/long.h index 97461fc35..cc233b957 100644 --- a/third_party/getopt/long.h +++ b/third_party/getopt/long.h @@ -1,5 +1,8 @@ -#ifndef COSMOPOLITAN_THIRD_PARTY_GETOPT_LONG_H_ -#define COSMOPOLITAN_THIRD_PARTY_GETOPT_LONG_H_ +#ifndef COSMOPOLITAN_GETOPT_LONG_H_ +#define COSMOPOLITAN_GETOPT_LONG_H_ +#ifdef COSMOPOLITAN_GETOPT_H_ +#error "don't mix getopt_long() with cosmo's getopt()" +#endif #define no_argument 0 #define required_argument 1 @@ -15,10 +18,14 @@ struct option { int val; }; +extern char *optarg; +extern int optind, opterr, optopt, optreset; + +int getopt(int, char *const *, const char *); int getopt_long(int, char *const *, const char *, const struct option *, int *); int getopt_long_only(int, char *const *, const char *, const struct option *, int *); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_THIRD_PARTY_GETOPT_LONG_H_ */ +#endif /* COSMOPOLITAN_GETOPT_LONG_H_ */ diff --git a/third_party/hiredis/alloc.c b/third_party/hiredis/alloc.c index b6625c67d..c294c59ea 100644 --- a/third_party/hiredis/alloc.c +++ b/third_party/hiredis/alloc.c @@ -45,7 +45,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/third_party/hiredis/async.c b/third_party/hiredis/async.c index b61f1c436..17e194f95 100644 --- a/third_party/hiredis/async.c +++ b/third_party/hiredis/async.c @@ -44,7 +44,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #include "libc/mem/alg.h" diff --git a/third_party/hiredis/dict.c b/third_party/hiredis/dict.c index 509f38ae5..8bb2bead5 100644 --- a/third_party/hiredis/dict.c +++ b/third_party/hiredis/dict.c @@ -48,7 +48,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #include "libc/assert.h" diff --git a/third_party/hiredis/hiredis.c b/third_party/hiredis/hiredis.c index cc58a8ba5..6a10a5b4a 100644 --- a/third_party/hiredis/hiredis.c +++ b/third_party/hiredis/hiredis.c @@ -47,7 +47,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #include "libc/assert.h" diff --git a/third_party/hiredis/net.c b/third_party/hiredis/net.c index 4517c2116..d0f938a86 100644 --- a/third_party/hiredis/net.c +++ b/third_party/hiredis/net.c @@ -91,7 +91,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/third_party/hiredis/read.c b/third_party/hiredis/read.c index 31af6cfa9..cf32d2d7c 100644 --- a/third_party/hiredis/read.c +++ b/third_party/hiredis/read.c @@ -45,7 +45,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #ifndef _MSC_VER @@ -59,7 +58,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" #include "libc/str/locale.h" diff --git a/third_party/hiredis/sds.c b/third_party/hiredis/sds.c index 9b4c0b335..c592258f8 100644 --- a/third_party/hiredis/sds.c +++ b/third_party/hiredis/sds.c @@ -51,7 +51,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #include "libc/mem/alg.h" diff --git a/third_party/libcxx/thread.cc b/third_party/libcxx/thread.cc index c621bb48c..e6c7420d6 100644 --- a/third_party/libcxx/thread.cc +++ b/third_party/libcxx/thread.cc @@ -49,7 +49,6 @@ #include "libc/sysv/consts/fileno.h" #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" -#include "third_party/getopt/getopt.h" #endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__) || defined(__wasi__) #if defined(_LIBCPP_WIN32API) diff --git a/third_party/musl/encrypt.c b/third_party/musl/encrypt.c index c401a5021..5866cc307 100644 --- a/third_party/musl/encrypt.c +++ b/third_party/musl/encrypt.c @@ -25,22 +25,21 @@ │ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/mem/alg.h" #include "libc/calls/calls.h" #include "libc/calls/weirdtypes.h" #include "libc/fmt/conv.h" #include "libc/limits.h" #include "libc/literal.h" +#include "libc/mem/alg.h" #include "libc/mem/mem.h" -#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" +#include "libc/stdio/rand.h" #include "libc/stdio/temp.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/fileno.h" #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt_des.internal.h" asm(".ident\t\"\\n\\n\ diff --git a/third_party/python/pycomp.c b/third_party/python/pycomp.c index 0a39710b9..e69e82e05 100644 --- a/third_party/python/pycomp.c +++ b/third_party/python/pycomp.c @@ -29,7 +29,7 @@ #include "libc/sysv/consts/o.h" #include "libc/x/x.h" #include "libc/x/xasprintf.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/python/Include/bytesobject.h" #include "third_party/python/Include/compile.h" #include "third_party/python/Include/fileutils.h" diff --git a/third_party/python/pyobj.c b/third_party/python/pyobj.c index 75796db4a..7172d935b 100644 --- a/third_party/python/pyobj.c +++ b/third_party/python/pyobj.c @@ -36,7 +36,7 @@ #include "libc/time/time.h" #include "libc/x/x.h" #include "libc/zip.internal.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/bytesobject.h" #include "third_party/python/Include/code.h" diff --git a/third_party/quickjs/qjsc.c b/third_party/quickjs/qjsc.c index a143076de..19d7c98e3 100644 --- a/third_party/quickjs/qjsc.c +++ b/third_party/quickjs/qjsc.c @@ -33,7 +33,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/x/xasprintf.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/quickjs/cutils.h" #include "third_party/quickjs/quickjs-libc.h" diff --git a/third_party/radpajama/gptneox-util.h b/third_party/radpajama/gptneox-util.h index 49429f8a5..c06bf1a0a 100644 --- a/third_party/radpajama/gptneox-util.h +++ b/third_party/radpajama/gptneox-util.h @@ -27,7 +27,6 @@ #include "libc/sysv/consts/rlimit.h" #include "libc/sysv/consts/rusage.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/ggml/llama_util.h" #include "third_party/libcxx/cerrno" #include "third_party/libcxx/climits" diff --git a/third_party/radpajama/main-redpajama-chat.cc b/third_party/radpajama/main-redpajama-chat.cc index 2a293ac06..10e27e1a4 100644 --- a/third_party/radpajama/main-redpajama-chat.cc +++ b/third_party/radpajama/main-redpajama-chat.cc @@ -43,7 +43,6 @@ #include "libc/sysv/consts/sicode.h" #include "libc/sysv/consts/ss.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/libcxx/algorithm" #include "third_party/libcxx/cassert" #include "third_party/libcxx/cinttypes" diff --git a/third_party/radpajama/main-redpajama.cc b/third_party/radpajama/main-redpajama.cc index 62b2df4a0..0e4a654c3 100644 --- a/third_party/radpajama/main-redpajama.cc +++ b/third_party/radpajama/main-redpajama.cc @@ -43,7 +43,6 @@ #include "libc/sysv/consts/sicode.h" #include "libc/sysv/consts/ss.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/libcxx/cassert" #include "third_party/libcxx/cinttypes" #include "third_party/libcxx/cmath" diff --git a/third_party/sed/main.c b/third_party/sed/main.c index 3c5a4af02..ccc40700b 100644 --- a/third_party/sed/main.c +++ b/third_party/sed/main.c @@ -42,7 +42,7 @@ #include "libc/str/locale.h" #include "libc/str/str.h" #include "libc/sysv/consts/s.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/sed/cmd.h" #include "third_party/sed/defs.h" #include "third_party/sed/extern.h" diff --git a/third_party/tr/tr.c b/third_party/tr/tr.c index 65bb55241..f53995745 100644 --- a/third_party/tr/tr.c +++ b/third_party/tr/tr.c @@ -33,7 +33,7 @@ #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/tr/cmd.h" #include "third_party/tr/extern.h" // clang-format off diff --git a/third_party/xxhash/cli/xsum_bench.c b/third_party/xxhash/cli/xsum_bench.c index 4ce2cdfad..b325a7ec7 100644 --- a/third_party/xxhash/cli/xsum_bench.c +++ b/third_party/xxhash/cli/xsum_bench.c @@ -49,7 +49,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/assert.h" diff --git a/third_party/xxhash/cli/xsum_config.h b/third_party/xxhash/cli/xsum_config.h index 7fae8d0a5..b3db44b89 100644 --- a/third_party/xxhash/cli/xsum_config.h +++ b/third_party/xxhash/cli/xsum_config.h @@ -89,7 +89,6 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* declares _POSIX_VERSION */ # if defined(_POSIX_VERSION) /* POSIX compliant */ diff --git a/third_party/xxhash/cli/xsum_os_specific.c b/third_party/xxhash/cli/xsum_os_specific.c index ef7ca0676..c9e14d744 100644 --- a/third_party/xxhash/cli/xsum_os_specific.c +++ b/third_party/xxhash/cli/xsum_os_specific.c @@ -62,7 +62,6 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* isatty */ # define XSUM_IS_CONSOLE(stdStream) isatty(fileno(stdStream)) diff --git a/third_party/xxhash/cli/xsum_sanity_check.c b/third_party/xxhash/cli/xsum_sanity_check.c index 74377526f..90d3ad047 100644 --- a/third_party/xxhash/cli/xsum_sanity_check.c +++ b/third_party/xxhash/cli/xsum_sanity_check.c @@ -44,7 +44,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* exit */ #include "libc/assert.h" diff --git a/third_party/xxhash/cli/xxhsum.c b/third_party/xxhash/cli/xxhsum.c index 3af63a12f..991747e08 100644 --- a/third_party/xxhash/cli/xxhsum.c +++ b/third_party/xxhash/cli/xxhsum.c @@ -59,7 +59,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, calloc, free, exit */ #include "libc/mem/alg.h" diff --git a/third_party/xxhash/tests/bench/benchHash.c b/third_party/xxhash/tests/bench/benchHash.c index 7d63bda36..1495e7118 100644 --- a/third_party/xxhash/tests/bench/benchHash.c +++ b/third_party/xxhash/tests/bench/benchHash.c @@ -40,7 +40,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" // malloc #include "libc/assert.h" diff --git a/third_party/xxhash/tests/bench/benchfn.c b/third_party/xxhash/tests/bench/benchfn.c index 05744f96b..7a79d9443 100644 --- a/third_party/xxhash/tests/bench/benchfn.c +++ b/third_party/xxhash/tests/bench/benchfn.c @@ -27,7 +27,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/xxhash/tests/bench/bhDisplay.c b/third_party/xxhash/tests/bench/bhDisplay.c index 74334f13a..9d94840fc 100644 --- a/third_party/xxhash/tests/bench/bhDisplay.c +++ b/third_party/xxhash/tests/bench/bhDisplay.c @@ -41,7 +41,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* rand */ #include "libc/calls/calls.h" diff --git a/third_party/xxhash/tests/bench/timefn.c b/third_party/xxhash/tests/bench/timefn.c index 7ecc7a103..373056bad 100644 --- a/third_party/xxhash/tests/bench/timefn.c +++ b/third_party/xxhash/tests/bench/timefn.c @@ -34,7 +34,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* abort */ #include "libc/calls/calls.h" @@ -121,7 +120,7 @@ PTime UTIL_getSpanTimeNano(UTIL_time_t clockStart, UTIL_time_t clockEnd) #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* abort */ #include "libc/calls/calls.h" diff --git a/third_party/xxhash/tests/collisions/main.c b/third_party/xxhash/tests/collisions/main.c index 44f5e4b52..96765ff18 100644 --- a/third_party/xxhash/tests/collisions/main.c +++ b/third_party/xxhash/tests/collisions/main.c @@ -58,7 +58,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free, qsort, exit */ #include "libc/mem/alg.h" diff --git a/third_party/xxhash/tests/collisions/pool.c b/third_party/xxhash/tests/collisions/pool.c index fd19c9d03..931ed8acf 100644 --- a/third_party/xxhash/tests/collisions/pool.c +++ b/third_party/xxhash/tests/collisions/pool.c @@ -25,7 +25,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, calloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/xxhash/tests/collisions/sort.cc b/third_party/xxhash/tests/collisions/sort.cc index 7c01dc15b..1ef3f3d68 100644 --- a/third_party/xxhash/tests/collisions/sort.cc +++ b/third_party/xxhash/tests/collisions/sort.cc @@ -54,7 +54,6 @@ void sort64(uint64_t* table, size_t size) #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" // qsort diff --git a/third_party/xxhash/xxhash.h b/third_party/xxhash/xxhash.h index e3e9c9d98..ddb2438e7 100644 --- a/third_party/xxhash/xxhash.h +++ b/third_party/xxhash/xxhash.h @@ -1377,7 +1377,7 @@ XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, siz #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" * #include "libc/mem/alg.h" @@ -1827,7 +1827,7 @@ static void XXH_free(void* p) { (void)p; } #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/third_party/zip/tailor.h b/third_party/zip/tailor.h index 84d49db92..64be67202 100644 --- a/third_party/zip/tailor.h +++ b/third_party/zip/tailor.h @@ -246,7 +246,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #endif /* !NO_STDLIB_H */ @@ -262,7 +261,6 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* usually defines _POSIX_VERSION */ #endif /* !NO_UNISTD_H */ diff --git a/third_party/zip/zipcloak.c b/third_party/zip/zipcloak.c index 4daaa0dc7..8cd80f84a 100644 --- a/third_party/zip/zipcloak.c +++ b/third_party/zip/zipcloak.c @@ -49,7 +49,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" #endif diff --git a/third_party/zip/zipfile.c b/third_party/zip/zipfile.c index 4b3cdc0d5..a6e32a743 100644 --- a/third_party/zip/zipfile.c +++ b/third_party/zip/zipfile.c @@ -35,7 +35,6 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/third_party/zstd/lib/common/mem.h b/third_party/zstd/lib/common/mem.h index 8217f8270..2a7654584 100644 --- a/third_party/zstd/lib/common/mem.h +++ b/third_party/zstd/lib/common/mem.h @@ -42,7 +42,6 @@ extern "C" { #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* _byteswap_ulong */ // MISSING #include /* _byteswap_* */ diff --git a/third_party/zstd/lib/common/zstd_deps.h b/third_party/zstd/lib/common/zstd_deps.h index a0b065090..3fee87edf 100644 --- a/third_party/zstd/lib/common/zstd_deps.h +++ b/third_party/zstd/lib/common/zstd_deps.h @@ -70,7 +70,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/third_party/zstd/lib/compress/zstdmt_compress.c b/third_party/zstd/lib/compress/zstdmt_compress.c index 89ea3a099..740f53329 100644 --- a/third_party/zstd/lib/compress/zstdmt_compress.c +++ b/third_party/zstd/lib/compress/zstdmt_compress.c @@ -58,7 +58,6 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" #include "libc/calls/calls.h" diff --git a/third_party/zstd/lib/dictBuilder/cover.c b/third_party/zstd/lib/dictBuilder/cover.c index 1c678be26..48a37f6f9 100644 --- a/third_party/zstd/lib/dictBuilder/cover.c +++ b/third_party/zstd/lib/dictBuilder/cover.c @@ -42,7 +42,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free, qsort */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/lib/dictBuilder/cover.h b/third_party/zstd/lib/dictBuilder/cover.h index 1b1a15301..801c1a53e 100644 --- a/third_party/zstd/lib/dictBuilder/cover.h +++ b/third_party/zstd/lib/dictBuilder/cover.h @@ -33,7 +33,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free, qsort */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/lib/dictBuilder/divsufsort.c b/third_party/zstd/lib/dictBuilder/divsufsort.c index 3613a6f89..58622bfb2 100644 --- a/third_party/zstd/lib/dictBuilder/divsufsort.c +++ b/third_party/zstd/lib/dictBuilder/divsufsort.c @@ -58,7 +58,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/third_party/zstd/lib/dictBuilder/fastcover.c b/third_party/zstd/lib/dictBuilder/fastcover.c index 37031ddde..97cfea17a 100644 --- a/third_party/zstd/lib/dictBuilder/fastcover.c +++ b/third_party/zstd/lib/dictBuilder/fastcover.c @@ -32,7 +32,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free, qsort */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/lib/dictBuilder/zdict.c b/third_party/zstd/lib/dictBuilder/zdict.c index 28eacdce7..ef9061d1e 100644 --- a/third_party/zstd/lib/dictBuilder/zdict.c +++ b/third_party/zstd/lib/dictBuilder/zdict.c @@ -50,7 +50,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/programs/benchfn.c b/third_party/zstd/programs/benchfn.c index f769e7a9a..1fa8cf6f8 100644 --- a/third_party/zstd/programs/benchfn.c +++ b/third_party/zstd/programs/benchfn.c @@ -27,7 +27,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/programs/benchzstd.c b/third_party/zstd/programs/benchzstd.c index d14fd5c0e..0aea1ac84 100644 --- a/third_party/zstd/programs/benchzstd.c +++ b/third_party/zstd/programs/benchzstd.c @@ -36,7 +36,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/programs/datagen.c b/third_party/zstd/programs/datagen.c index 0253e6737..6cd2a25c3 100644 --- a/third_party/zstd/programs/datagen.c +++ b/third_party/zstd/programs/datagen.c @@ -29,7 +29,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/calls/calls.h" diff --git a/third_party/zstd/programs/dibio.c b/third_party/zstd/programs/dibio.c index fc2ae7190..da195a146 100644 --- a/third_party/zstd/programs/dibio.c +++ b/third_party/zstd/programs/dibio.c @@ -38,7 +38,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/programs/fileio.c b/third_party/zstd/programs/fileio.c index 2b5ecf300..5182836d9 100644 --- a/third_party/zstd/programs/fileio.c +++ b/third_party/zstd/programs/fileio.c @@ -46,7 +46,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/programs/fileio_asyncio.c b/third_party/zstd/programs/fileio_asyncio.c index 0a0ca1e04..038fbd899 100644 --- a/third_party/zstd/programs/fileio_asyncio.c +++ b/third_party/zstd/programs/fileio_asyncio.c @@ -30,7 +30,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, free */ #include "libc/assert.h" diff --git a/third_party/zstd/programs/platform.h b/third_party/zstd/programs/platform.h index 3d57aadc8..552e1b2c3 100644 --- a/third_party/zstd/programs/platform.h +++ b/third_party/zstd/programs/platform.h @@ -94,7 +94,6 @@ extern "C" { #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" whenever target OS is not unix-like * otherwise it will block preprocessing stage. @@ -108,7 +107,7 @@ extern "C" { #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" */ @@ -131,7 +130,7 @@ extern "C" { #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* declares _POSIX_VERSION */ # if defined(_POSIX_VERSION) /* POSIX compliant */ @@ -182,7 +181,7 @@ extern "C" { #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* isatty */ #include "libc/calls/calls.h" diff --git a/third_party/zstd/programs/timefn.c b/third_party/zstd/programs/timefn.c index b2cf20242..e3fd223b9 100644 --- a/third_party/zstd/programs/timefn.c +++ b/third_party/zstd/programs/timefn.c @@ -62,7 +62,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* abort */ #include "libc/calls/calls.h" @@ -127,7 +126,7 @@ UTIL_time_t UTIL_getTime(void) #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* abort */ #include "libc/calls/calls.h" @@ -175,7 +174,7 @@ UTIL_time_t UTIL_getTime(void) #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* abort */ #include "libc/calls/calls.h" diff --git a/third_party/zstd/programs/util.c b/third_party/zstd/programs/util.c index 573e21342..a966f3cc0 100644 --- a/third_party/zstd/programs/util.c +++ b/third_party/zstd/programs/util.c @@ -31,7 +31,6 @@ extern "C" { #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* malloc, realloc, free */ #include "libc/calls/calls.h" @@ -67,7 +66,7 @@ extern "C" { #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* chown, stat */ # if PLATFORM_POSIX_VERSION < 200809L || !defined(st_mtime) diff --git a/third_party/zstd/programs/util.h b/third_party/zstd/programs/util.h index 57cf65340..88c9dace0 100644 --- a/third_party/zstd/programs/util.h +++ b/third_party/zstd/programs/util.h @@ -93,7 +93,6 @@ extern "C" { #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/ok.h" #include "libc/time/time.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/lockf.h" /* sleep */ # define UTIL_sleep(s) sleep(s) diff --git a/third_party/zstd/programs/zstdcli.c b/third_party/zstd/programs/zstdcli.c index 6a94dab7c..fdf323680 100644 --- a/third_party/zstd/programs/zstdcli.c +++ b/third_party/zstd/programs/zstdcli.c @@ -43,7 +43,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" /* getenv */ #include "libc/mem/alg.h" diff --git a/third_party/zstd/programs/zstdcli_trace.c b/third_party/zstd/programs/zstdcli_trace.c index 32fdb68af..c1ff674d4 100644 --- a/third_party/zstd/programs/zstdcli_trace.c +++ b/third_party/zstd/programs/zstdcli_trace.c @@ -32,7 +32,6 @@ #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" #include "third_party/musl/crypt.h" #include "third_party/musl/rand48.h" diff --git a/tool/build/assimilate.c b/tool/build/assimilate.c index d8c40b94c..7ca2dc82b 100644 --- a/tool/build/assimilate.c +++ b/tool/build/assimilate.c @@ -31,7 +31,7 @@ #include "libc/sysv/consts/msync.h" #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/prot.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/regex/regex.h" STATIC_YOINK("strerror_wr"); diff --git a/tool/build/calculator.c b/tool/build/calculator.c index f1871005e..ef5b8b092 100644 --- a/tool/build/calculator.c +++ b/tool/build/calculator.c @@ -35,7 +35,7 @@ #include "libc/tinymath/emodl.h" #include "libc/x/xsigaction.h" #include "third_party/gdtoa/gdtoa.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define INT int128_t #define FLOAT long double diff --git a/tool/build/chmod.c b/tool/build/chmod.c index f717b6083..4f874613b 100644 --- a/tool/build/chmod.c +++ b/tool/build/chmod.c @@ -22,7 +22,7 @@ #include "libc/fmt/magnumstrs.internal.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " OCTAL DST...\n\ diff --git a/tool/build/compile.c b/tool/build/compile.c index 2e44c76c0..de85bbc60 100644 --- a/tool/build/compile.c +++ b/tool/build/compile.c @@ -64,7 +64,7 @@ #include "libc/sysv/consts/termios.h" #include "libc/time/time.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define MANUAL \ "\ diff --git a/tool/build/cp.c b/tool/build/cp.c index cc576e353..372c3247a 100644 --- a/tool/build/cp.c +++ b/tool/build/cp.c @@ -35,7 +35,7 @@ #include "libc/sysv/consts/ok.h" #include "libc/sysv/consts/s.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/ftw.h" #define USAGE \ diff --git a/tool/build/fixupobj.c b/tool/build/fixupobj.c index 4e5bce1d5..c294dbbc7 100644 --- a/tool/build/fixupobj.c +++ b/tool/build/fixupobj.c @@ -42,7 +42,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/prot.h" #include "libc/zip.internal.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" /** * @fileoverview GCC Codegen Fixer-Upper. diff --git a/tool/build/gzip.c b/tool/build/gzip.c index 4abeedb26..479e03d29 100644 --- a/tool/build/gzip.c +++ b/tool/build/gzip.c @@ -26,7 +26,7 @@ #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/ok.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/zlib/zlib.h" #define USAGE \ diff --git a/tool/build/helpop.c b/tool/build/helpop.c index c41f8d16d..75af5c496 100644 --- a/tool/build/helpop.c +++ b/tool/build/helpop.c @@ -24,7 +24,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " [FLAGS] OPERAND..\n\ diff --git a/tool/build/lz4toasm.c b/tool/build/lz4toasm.c index ee6eb079d..62f2b62cd 100644 --- a/tool/build/lz4toasm.c +++ b/tool/build/lz4toasm.c @@ -32,7 +32,7 @@ #include "libc/str/str.h" #include "libc/str/tab.internal.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" /** * @fileoverview LZ4 content embedder. diff --git a/tool/build/mkdeps.c b/tool/build/mkdeps.c index c01c51fc9..f10227743 100644 --- a/tool/build/mkdeps.c +++ b/tool/build/mkdeps.c @@ -53,7 +53,7 @@ #include "libc/thread/wait0.internal.h" #include "libc/time/time.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/build/lib/getargs.h" /** diff --git a/tool/build/mkdir.c b/tool/build/mkdir.c index 38535e2cc..57167db2e 100644 --- a/tool/build/mkdir.c +++ b/tool/build/mkdir.c @@ -16,7 +16,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " [-p] [-m MODE] DIR...\n\ diff --git a/tool/build/mv.c b/tool/build/mv.c index 3d35af18d..acf982b09 100644 --- a/tool/build/mv.c +++ b/tool/build/mv.c @@ -31,7 +31,7 @@ #include "libc/sysv/consts/ok.h" #include "libc/sysv/consts/s.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/musl/ftw.h" #define USAGE \ diff --git a/tool/build/ocat.c b/tool/build/ocat.c index d45bb5b79..d60f6c3b9 100644 --- a/tool/build/ocat.c +++ b/tool/build/ocat.c @@ -24,7 +24,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/o.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" char buf[512]; diff --git a/tool/build/package.c b/tool/build/package.c index b1b9281bf..f6d0ba172 100644 --- a/tool/build/package.c +++ b/tool/build/package.c @@ -39,7 +39,7 @@ #include "libc/sysv/consts/map.h" #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/prot.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/xed/x86.h" #include "tool/build/lib/getargs.h" diff --git a/tool/build/pledge.c b/tool/build/pledge.c index c73923180..9f23bb87d 100644 --- a/tool/build/pledge.c +++ b/tool/build/pledge.c @@ -60,7 +60,7 @@ #include "libc/sysv/consts/sched.h" #include "libc/sysv/errfuns.h" #include "libc/x/x.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" // MANUALLY TESTED BY RUNNING // diff --git a/tool/build/pstrace.c b/tool/build/pstrace.c index 5e0b20fab..d8a7c0cd3 100644 --- a/tool/build/pstrace.c +++ b/tool/build/pstrace.c @@ -38,7 +38,7 @@ #include "libc/x/xasprintf.h" #include "libc/x/xgetline.h" #include "third_party/dlmalloc/dlmalloc.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" /** * @fileoverview Pythonic System Call Trace diff --git a/tool/build/rle.c b/tool/build/rle.c index 16b3c3696..1d4afa547 100644 --- a/tool/build/rle.c +++ b/tool/build/rle.c @@ -28,7 +28,7 @@ #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/errfuns.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE1 \ "NAME\n\ diff --git a/tool/build/rm.c b/tool/build/rm.c index 8bda75be6..8c2e7aaa0 100644 --- a/tool/build/rm.c +++ b/tool/build/rm.c @@ -25,7 +25,7 @@ #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/ok.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " FILE...\n\ diff --git a/tool/build/runitd.c b/tool/build/runitd.c index b95b0b730..6a6baf104 100644 --- a/tool/build/runitd.c +++ b/tool/build/runitd.c @@ -56,7 +56,7 @@ #include "libc/x/x.h" #include "libc/x/xasprintf.h" #include "net/https/https.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/mbedtls/ssl.h" #include "third_party/zlib/zlib.h" #include "tool/build/lib/eztls.h" diff --git a/tool/build/sha256sum.c b/tool/build/sha256sum.c index 28b8377b5..0ad9f5651 100644 --- a/tool/build/sha256sum.c +++ b/tool/build/sha256sum.c @@ -25,7 +25,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/str/tab.internal.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/mbedtls/sha256.h" #define PROG "sha256sum" diff --git a/tool/build/symtab.c b/tool/build/symtab.c index a5145e2c2..948c4ca4e 100644 --- a/tool/build/symtab.c +++ b/tool/build/symtab.c @@ -24,7 +24,7 @@ #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/o.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" /** * @fileoverview elf to symbol table file dump tool diff --git a/tool/build/unbuffer.c b/tool/build/unbuffer.c index 3dd6ab9c6..a9a55361c 100644 --- a/tool/build/unbuffer.c +++ b/tool/build/unbuffer.c @@ -32,7 +32,7 @@ #include "libc/sysv/consts/sig.h" #include "libc/sysv/consts/termios.h" #include "libc/sysv/consts/w.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define GETOPTS "o:" diff --git a/tool/build/unveil.c b/tool/build/unveil.c index 035207fd7..564b5cfdf 100644 --- a/tool/build/unveil.c +++ b/tool/build/unveil.c @@ -24,7 +24,7 @@ #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ "\ diff --git a/tool/build/zipcopy.c b/tool/build/zipcopy.c index f3fbf815d..d7c6c50c4 100644 --- a/tool/build/zipcopy.c +++ b/tool/build/zipcopy.c @@ -28,7 +28,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/prot.h" #include "libc/zip.internal.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" static int infd; static int outfd; diff --git a/tool/build/zipobj.c b/tool/build/zipobj.c index aebbc9b9f..9ff355e36 100644 --- a/tool/build/zipobj.c +++ b/tool/build/zipobj.c @@ -38,7 +38,7 @@ #include "libc/time/time.h" #include "libc/x/x.h" #include "libc/zip.internal.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/build/lib/elfwriter.h" #include "tool/build/lib/stripcomponents.h" diff --git a/tool/curl/curl.c b/tool/curl/curl.c index f39a56590..409752b17 100644 --- a/tool/curl/curl.c +++ b/tool/curl/curl.c @@ -45,7 +45,7 @@ #include "net/http/url.h" #include "net/https/https.h" #include "net/https/sslcache.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/mbedtls/ctr_drbg.h" #include "third_party/mbedtls/debug.h" #include "third_party/mbedtls/error.h" diff --git a/tool/decode/ent.c b/tool/decode/ent.c index a49723dda..ff4db3982 100644 --- a/tool/decode/ent.c +++ b/tool/decode/ent.c @@ -30,7 +30,7 @@ #include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define UPDATE "January 28th, 2008" diff --git a/tool/decode/mkcombos.c b/tool/decode/mkcombos.c index d2f64a878..8dc4ba127 100644 --- a/tool/decode/mkcombos.c +++ b/tool/decode/mkcombos.c @@ -27,7 +27,7 @@ #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/fileno.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/zlib/zlib.h" #include "tool/decode/lib/bitabuilder.h" diff --git a/tool/decode/mkwides.c b/tool/decode/mkwides.c index 26c89663a..4c99df661 100644 --- a/tool/decode/mkwides.c +++ b/tool/decode/mkwides.c @@ -25,7 +25,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/decode/lib/bitabuilder.h" static FILE *fin, *fout; diff --git a/tool/decode/x86opinfo.c b/tool/decode/x86opinfo.c index 6d9c0a681..741c82c91 100644 --- a/tool/decode/x86opinfo.c +++ b/tool/decode/x86opinfo.c @@ -23,7 +23,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/xed/x86.h" #include "tool/decode/lib/idname.h" #include "tool/decode/lib/xederrors.h" diff --git a/tool/lambda/asc2bin.c b/tool/lambda/asc2bin.c index b3c8ac5ea..17c94735e 100644 --- a/tool/lambda/asc2bin.c +++ b/tool/lambda/asc2bin.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/runtime/runtime.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/lambda/lib/blc.h" #define USAGE \ diff --git a/tool/lambda/blcdump.c b/tool/lambda/blcdump.c index d5fa28748..d06d3bc7a 100644 --- a/tool/lambda/blcdump.c +++ b/tool/lambda/blcdump.c @@ -21,7 +21,7 @@ #include "libc/runtime/runtime.h" #include "libc/str/locale.h" #include "libc/sysv/consts/rlimit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/lambda/lib/blc.h" /** diff --git a/tool/lambda/bru2bin.c b/tool/lambda/bru2bin.c index ecfd25a35..ce6bcde67 100644 --- a/tool/lambda/bru2bin.c +++ b/tool/lambda/bru2bin.c @@ -23,7 +23,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/locale.h" #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " [-?h01] binary.txt\n\ diff --git a/tool/lambda/lam2bin.c b/tool/lambda/lam2bin.c index 17e3810f0..e5ac458ec 100644 --- a/tool/lambda/lam2bin.c +++ b/tool/lambda/lam2bin.c @@ -23,7 +23,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/locale.h" #include "libc/str/str.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " [-?h] binary.txt\n\ diff --git a/tool/lambda/lambda.c b/tool/lambda/lambda.c index 667f0adb0..e3a9448aa 100644 --- a/tool/lambda/lambda.c +++ b/tool/lambda/lambda.c @@ -28,7 +28,7 @@ #include "libc/sysv/consts/prot.h" #include "libc/sysv/consts/rlimit.h" #include "libc/sysv/consts/sig.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/lambda/lib/blc.h" #define USAGE \ diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 318b893cd..b3d43f9c1 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -112,7 +112,7 @@ #include "net/http/tokenbucket.h" #include "net/http/url.h" #include "net/https/https.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/lua/cosmo.h" #include "third_party/lua/lauxlib.h" #include "third_party/lua/lrepl.h" diff --git a/tool/net/wb.c b/tool/net/wb.c index 288765258..14a36004d 100644 --- a/tool/net/wb.c +++ b/tool/net/wb.c @@ -49,7 +49,7 @@ #include "net/http/http.h" #include "net/http/url.h" #include "net/https/https.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "third_party/mbedtls/ctr_drbg.h" #include "third_party/mbedtls/debug.h" #include "third_party/mbedtls/error.h" diff --git a/tool/plinko/lib/plinko.c b/tool/plinko/lib/plinko.c index c0ba54dfe..dae84368e 100644 --- a/tool/plinko/lib/plinko.c +++ b/tool/plinko/lib/plinko.c @@ -39,7 +39,7 @@ #include "libc/sysv/consts/prot.h" #include "libc/sysv/consts/sig.h" #include "libc/time/clockstonanos.internal.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #include "tool/build/lib/case.h" #include "tool/plinko/lib/char.h" #include "tool/plinko/lib/error.h" diff --git a/tool/viz/bing.c b/tool/viz/bing.c index 672637e64..b18e9143d 100644 --- a/tool/viz/bing.c +++ b/tool/viz/bing.c @@ -25,7 +25,7 @@ #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/fileno.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" /** * @fileoverview Bing: Binary → Glyphs. diff --git a/tool/viz/comma.c b/tool/viz/comma.c index 95e049531..ee200cf4e 100644 --- a/tool/viz/comma.c +++ b/tool/viz/comma.c @@ -24,7 +24,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" -#include "third_party/getopt/getopt.h" +#include "third_party/getopt/getopt.internal.h" #define USAGE \ " [FLAGS] [PATH|FLEXDEC...] [<<