modernc.org/cc@v1.0.1/v2/headers/linux_386/usr/include/i386-linux-gnu/bits/getopt_posix.h (about)

     1  /* Declarations for getopt (POSIX compatibility shim).
     2     Copyright (C) 1989-2018 Free Software Foundation, Inc.
     3     Unlike the bulk of the getopt implementation, this file is NOT part
     4     of gnulib.
     5  
     6     The GNU C Library is free software; you can redistribute it and/or
     7     modify it under the terms of the GNU Lesser General Public
     8     License as published by the Free Software Foundation; either
     9     version 2.1 of the License, or (at your option) any later version.
    10  
    11     The GNU C Library is distributed in the hope that it will be useful,
    12     but WITHOUT ANY WARRANTY; without even the implied warranty of
    13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    14     Lesser General Public License for more details.
    15  
    16     You should have received a copy of the GNU Lesser General Public
    17     License along with the GNU C Library; if not, see
    18     <http://www.gnu.org/licenses/>.  */
    19  
    20  #ifndef _GETOPT_POSIX_H
    21  #define _GETOPT_POSIX_H 1
    22  
    23  #if !defined _UNISTD_H && !defined _STDIO_H
    24  #error "Never include getopt_posix.h directly; use unistd.h instead."
    25  #endif
    26  
    27  #include <bits/getopt_core.h>
    28  
    29  __BEGIN_DECLS
    30  #if defined __USE_POSIX2 && !defined __USE_POSIX_IMPLICITLY \
    31      && !defined __USE_GNU && !defined _GETOPT_H
    32  /* GNU getopt has more functionality than POSIX getopt.  When we are
    33     explicitly conforming to POSIX and not GNU, and getopt.h (which is
    34     not part of POSIX) has not been included, the extra functionality
    35     is disabled.  */
    36  # ifdef __REDIRECT
    37  extern int __REDIRECT_NTH(getopt, (int ___argc, char *const *___argv, const char *__shortopts), __posix_getopt);
    38  # else
    39  extern int __posix_getopt(int ___argc, char *const *___argv, const char *__shortopts)
    40  __THROW __nonnull((2, 3));
    41  #  define getopt __posix_getopt
    42  # endif
    43  #endif
    44  
    45  __END_DECLS
    46  #endif				/* getopt_posix.h */