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

25
third_party/getopt/getopt.internal.h vendored Normal file
View file

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