123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- #ifndef _GETOPT_H
- #ifndef __need_getopt
- # define _GETOPT_H 1
- #endif
- #if !defined __GNU_LIBRARY__
- # include <ctype.h>
- #endif
- #ifndef __THROW
- # ifndef __GNUC_PREREQ
- # define __GNUC_PREREQ(maj, min) (0)
- # endif
- # if defined __cplusplus && __GNUC_PREREQ (2,8)
- # define __THROW throw ()
- # else
- # define __THROW
- # endif
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern char *optarg;
- extern int optind;
- extern int opterr;
- extern int optopt;
- #ifndef __need_getopt
- struct option
- {
- const char *name;
-
- int has_arg;
- int *flag;
- int val;
- };
- # define no_argument 0
- # define required_argument 1
- # define optional_argument 2
- #endif
- #ifdef __GNU_LIBRARY__
- extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW;
- # if defined __need_getopt && defined __USE_POSIX2 \
- && !defined __USE_POSIX_IMPLICITLY && !defined __USE_GNU
- # ifdef __REDIRECT
- extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv,
- const char *__shortopts),
- __posix_getopt);
- # else
- extern int __posix_getopt (int ___argc, char *const *___argv,
- const char *__shortopts) __THROW;
- # define getopt __posix_getopt
- # endif
- # endif
- #else
- extern int getopt ();
- #endif
- #ifndef __need_getopt
- extern int getopt_long (int ___argc, char *const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW;
- extern int getopt_long_only (int ___argc, char *const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW;
- #endif
- #ifdef __cplusplus
- }
- #endif
- #undef __need_getopt
- #endif
|