xref: /dflybsd-src/gnu/usr.bin/grep/libgreputils/getopt-cdefs.h (revision 4ce1b01662e01b4aeb3dbaf5e68504c3aa2a1581)
1*4ce1b016SDaniel Fojt /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2*4ce1b016SDaniel Fojt /* getopt-on-non-glibc compatibility macros.
3*4ce1b016SDaniel Fojt    Copyright (C) 1989-2020 Free Software Foundation, Inc.
4*4ce1b016SDaniel Fojt    This file is part of gnulib.
5*4ce1b016SDaniel Fojt    Unlike most of the getopt implementation, it is NOT shared
6*4ce1b016SDaniel Fojt    with the GNU C Library.
7*4ce1b016SDaniel Fojt 
8*4ce1b016SDaniel Fojt    This file is free software; you can redistribute it and/or modify it
9*4ce1b016SDaniel Fojt    under the terms of the GNU General Public License as
10*4ce1b016SDaniel Fojt    published by the Free Software Foundation; either version 3 of
11*4ce1b016SDaniel Fojt    the License, or (at your option) any later version.
12*4ce1b016SDaniel Fojt 
13*4ce1b016SDaniel Fojt    This file is distributed in the hope that it will be useful, but
14*4ce1b016SDaniel Fojt    WITHOUT ANY WARRANTY; without even the implied warranty of
15*4ce1b016SDaniel Fojt    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16*4ce1b016SDaniel Fojt    General Public License for more details.
17*4ce1b016SDaniel Fojt 
18*4ce1b016SDaniel Fojt    You should have received a copy of the GNU General Public
19*4ce1b016SDaniel Fojt    License along with gnulib; if not, see
20*4ce1b016SDaniel Fojt    <https://www.gnu.org/licenses/>.  */
21*4ce1b016SDaniel Fojt 
22*4ce1b016SDaniel Fojt #ifndef _GETOPT_CDEFS_H
23*4ce1b016SDaniel Fojt #define _GETOPT_CDEFS_H 1
24*4ce1b016SDaniel Fojt 
25*4ce1b016SDaniel Fojt /* This header should not be used directly; include getopt.h or
26*4ce1b016SDaniel Fojt    unistd.h instead.  It does not have a protective #error, because
27*4ce1b016SDaniel Fojt    the guard macro for getopt.h in gnulib is not fixed.  */
28*4ce1b016SDaniel Fojt 
29*4ce1b016SDaniel Fojt /* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect
30*4ce1b016SDaniel Fojt    a number of the internal macros supplied to GNU libc's headers by
31*4ce1b016SDaniel Fojt    sys/cdefs.h.  Provide fallback definitions for all of them.  */
32*4ce1b016SDaniel Fojt #if 1
33*4ce1b016SDaniel Fojt # include <sys/cdefs.h>
34*4ce1b016SDaniel Fojt #endif
35*4ce1b016SDaniel Fojt 
36*4ce1b016SDaniel Fojt #ifndef __BEGIN_DECLS
37*4ce1b016SDaniel Fojt # ifdef __cplusplus
38*4ce1b016SDaniel Fojt #  define __BEGIN_DECLS extern "C" {
39*4ce1b016SDaniel Fojt # else
40*4ce1b016SDaniel Fojt #  define __BEGIN_DECLS /* nothing */
41*4ce1b016SDaniel Fojt # endif
42*4ce1b016SDaniel Fojt #endif
43*4ce1b016SDaniel Fojt #ifndef __END_DECLS
44*4ce1b016SDaniel Fojt # ifdef __cplusplus
45*4ce1b016SDaniel Fojt #  define __END_DECLS }
46*4ce1b016SDaniel Fojt # else
47*4ce1b016SDaniel Fojt #  define __END_DECLS /* nothing */
48*4ce1b016SDaniel Fojt # endif
49*4ce1b016SDaniel Fojt #endif
50*4ce1b016SDaniel Fojt 
51*4ce1b016SDaniel Fojt #ifndef __GNUC_PREREQ
52*4ce1b016SDaniel Fojt # if defined __GNUC__ && defined __GNUC_VERSION__
53*4ce1b016SDaniel Fojt # define __GNUC_PREREQ(maj, min) \
54*4ce1b016SDaniel Fojt         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
55*4ce1b016SDaniel Fojt # else
56*4ce1b016SDaniel Fojt #  define __GNUC_PREREQ(maj, min) 0
57*4ce1b016SDaniel Fojt # endif
58*4ce1b016SDaniel Fojt #endif
59*4ce1b016SDaniel Fojt 
60*4ce1b016SDaniel Fojt #ifndef __THROW
61*4ce1b016SDaniel Fojt # if defined __cplusplus && __GNUC_PREREQ (2,8)
62*4ce1b016SDaniel Fojt #  define __THROW       throw ()
63*4ce1b016SDaniel Fojt # else
64*4ce1b016SDaniel Fojt #  define __THROW
65*4ce1b016SDaniel Fojt # endif
66*4ce1b016SDaniel Fojt #endif
67*4ce1b016SDaniel Fojt 
68*4ce1b016SDaniel Fojt #endif /* _GETOPT_CDEFS_H */
69