123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- #ifndef _GL_GETOPT_H
- #if __GNUC__ >= 3
- #pragma GCC system_header
- #endif
- #if HAVE_GETOPT_H
- # define _GL_SYSTEM_GETOPT
- # ifndef __GNUC__
- # include <next_getopt.h>
- # else
- # include_next <getopt.h>
- # endif
- # undef _GL_SYSTEM_GETOPT
- #endif
- #ifndef _GL_GETOPT_H
- #ifndef __need_getopt
- # define _GL_GETOPT_H 1
- #endif
- #if defined __GETOPT_PREFIX && !defined __need_getopt
- # if !HAVE_GETOPT_H
- # include <stdlib.h>
- # include <stdio.h>
- # include <unistd.h>
- # endif
- # undef __need_getopt
- # undef getopt
- # undef getopt_long
- # undef getopt_long_only
- # undef optarg
- # undef opterr
- # undef optind
- # undef optopt
- # undef option
- # define __GETOPT_CONCAT(x, y) x ## y
- # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
- # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
- # define getopt __GETOPT_ID (getopt)
- # define getopt_long __GETOPT_ID (getopt_long)
- # define getopt_long_only __GETOPT_ID (getopt_long_only)
- # define optarg __GETOPT_ID (optarg)
- # define opterr __GETOPT_ID (opterr)
- # define optind __GETOPT_ID (optind)
- # define optopt __GETOPT_ID (optopt)
- # define option __GETOPT_ID (option)
- # define _getopt_internal __GETOPT_ID (getopt_internal)
- #endif
- #if !defined __need_getopt
- # if defined __GETOPT_PREFIX
- # define __getopt_argv_const
- # else
- # define __getopt_argv_const const
- # endif
- #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
- #ifndef _GL_ARG_NONNULL
- # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
- # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
- # else
- # define _GL_ARG_NONNULL(params)
- # endif
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern char *optarg;
- extern int optind;
- extern int opterr;
- extern int optopt;
- #ifndef __need_getopt
- # if !GNULIB_defined_struct_option
- struct option
- {
- const char *name;
-
- int has_arg;
- int *flag;
- int val;
- };
- # define GNULIB_defined_struct_option 1
- # endif
- # define no_argument 0
- # define required_argument 1
- # define optional_argument 2
- #endif
- extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW _GL_ARG_NONNULL ((2, 3));
- #ifndef __need_getopt
- extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW _GL_ARG_NONNULL ((2, 3));
- extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW _GL_ARG_NONNULL ((2, 3));
- #endif
- #ifdef __cplusplus
- }
- #endif
- #undef __need_getopt
- #endif
- #endif
|