adjust makefile to make crt/ and ldso/ sources arch-replaceable
[musl.git] / include / getopt.h
blobc1d0df928f749ac0f3094b80f2422abce23b2dfa
1 #ifndef _GETOPT_H
2 #define _GETOPT_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 int getopt(int, char * const [], const char *);
9 extern char *optarg;
10 extern int optind, opterr, optopt, optreset;
12 struct option
14 const char *name;
15 int has_arg;
16 int *flag;
17 int val;
20 int getopt_long(int, char *const *, const char *, const struct option *, int *);
21 int getopt_long_only(int, char *const *, const char *, const struct option *, int *);
23 #define no_argument 0
24 #define required_argument 1
25 #define optional_argument 2
27 #ifdef __cplusplus
29 #endif
31 #endif