mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Introduce #include <tinygetopt.h>
The normal getopt() function is bloated because it links printf(). This change exports the original authentic bsd getopt function, that cosmo's always used internally so cosmocc users don't need to include internals
This commit is contained in:
parent
07cef612c3
commit
b74b974cfd
2 changed files with 2 additions and 1 deletions
1
libc/isystem/tinygetopt.h
Normal file
1
libc/isystem/tinygetopt.h
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#include "third_party/getopt/getopt.internal.h"
|
2
third_party/getopt/getopt.internal.h
vendored
2
third_party/getopt/getopt.internal.h
vendored
|
@ -16,7 +16,7 @@ COSMOPOLITAN_C_START_
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind, opterr, optopt, optreset;
|
extern int optind, opterr, optopt, optreset;
|
||||||
|
|
||||||
int getopt(int, char *const[], const char *) paramsnonnull();
|
int getopt(int, char *const[], const char *) paramsnonnull() libcesque;
|
||||||
|
|
||||||
COSMOPOLITAN_C_END_
|
COSMOPOLITAN_C_END_
|
||||||
#endif /* COSMOPOLITAN_GETOPT_H_ */
|
#endif /* COSMOPOLITAN_GETOPT_H_ */
|
||||||
|
|
Loading…
Reference in a new issue