Switch public headers to getopt_long() entirely

Cosmopolitan's getopt() is now redefined as __getopt().
This commit is contained in:
Justine Tunney 2023-07-02 19:57:43 -07:00
parent 0c630d95b5
commit fe044e22cc
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
137 changed files with 148 additions and 179 deletions

View file

@ -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");

View file

@ -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

View file

@ -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\

View file

@ -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 \
"\

View file

@ -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 \

View file

@ -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.

View file

@ -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 \

View file

@ -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\

View file

@ -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.

View file

@ -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"
/**

View file

@ -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\

View file

@ -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 \

View file

@ -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];

View file

@ -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"

View file

@ -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
//

View file

@ -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

View file

@ -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\

View file

@ -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\

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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:"

View file

@ -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 \
"\

View file

@ -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;

View file

@ -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"