mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Introduce #include <cosmo.h>
to toolchain users
This change improves the way internal APIs are being hidden behind the `COSMO` define. The cosmo.h header will take care of defining that, so that a separate define statement isn't needed. This change also does a lot more to define which APIs are standard, and which belong to Cosmo.
This commit is contained in:
parent
9b55dbe417
commit
4a59210008
115 changed files with 699 additions and 422 deletions
6
third_party/getopt/getopt.h
vendored
6
third_party/getopt/getopt.h
vendored
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_
|
||||
#ifdef COSMO
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
|
@ -12,8 +11,8 @@ COSMOPOLITAN_C_START_
|
|||
extern char *optarg;
|
||||
extern int optind, opterr, optopt, optreset;
|
||||
|
||||
int getopt(int, char *const[], const char *);
|
||||
int getsubopt(char **, char *const *, char **);
|
||||
int getopt(int, char *const[], const char *) paramsnonnull();
|
||||
int getsubopt(char **, char *const *, char **) paramsnonnull();
|
||||
|
||||
struct option {
|
||||
const char *name;
|
||||
|
@ -28,5 +27,4 @@ int getopt_long_only(int, char *const *, const char *, const struct option *,
|
|||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMO */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue