mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Refactor fatcosmocc into a single file
This commit is contained in:
parent
b494d56549
commit
0e586c834a
15 changed files with 217 additions and 240 deletions
27
third_party/getopt/long2.h
vendored
Normal file
27
third_party/getopt/long2.h
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef COSMOPOLITAN_GETOPT_LONG2_H_
|
||||
#define COSMOPOLITAN_GETOPT_LONG2_H_
|
||||
#ifdef COSMOPOLITAN_GETOPT_H_
|
||||
#error "don't mix getopt_long() with cosmo's getopt()"
|
||||
#endif
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct option {
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
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_GETOPT_LONG2_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue