timevar: import from Bison.
[gnulib.git] / lib / getopt.in.h
blob9a5d562336be66696ae63839ad7ea0e88d26720f
1 /* Declarations for getopt.
2 Copyright (C) 1989-2018 Free Software Foundation, Inc.
3 This file is part of gnulib.
4 Unlike most of the getopt implementation, it is NOT shared
5 with the GNU C Library, which supplies a different version of
6 this file.
8 This file is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as
10 published by the Free Software Foundation; either version 2.1 of
11 the License, or (at your option) any later version.
13 This file is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with gnulib; if not, see <https://www.gnu.org/licenses/>. */
21 #ifndef _@GUARD_PREFIX@_GETOPT_H
23 #if __GNUC__ >= 3
24 @PRAGMA_SYSTEM_HEADER@
25 #endif
26 @PRAGMA_COLUMNS@
28 /* The include_next requires a split double-inclusion guard. We must
29 also inform the replacement unistd.h to not recursively use
30 <getopt.h>; our definitions will be present soon enough. */
31 #if @HAVE_GETOPT_H@
32 # define _GL_SYSTEM_GETOPT
33 # @INCLUDE_NEXT@ @NEXT_GETOPT_H@
34 # undef _GL_SYSTEM_GETOPT
35 #endif
37 #define _@GUARD_PREFIX@_GETOPT_H 1
39 /* Standalone applications should #define __GETOPT_PREFIX to an
40 identifier that prefixes the external functions and variables
41 defined in getopt-core.h and getopt-ext.h. When this happens,
42 include the headers that might declare getopt so that they will not
43 cause confusion if included after this file (if the system had
44 <getopt.h>, we have already included it). */
45 #if defined __GETOPT_PREFIX
46 # if !@HAVE_GETOPT_H@
47 # define __need_system_stdlib_h
48 # include <stdlib.h>
49 # undef __need_system_stdlib_h
50 # include <stdio.h>
51 # include <unistd.h>
52 # endif
53 #endif
55 /* The definition of _GL_ARG_NONNULL is copied here. */
57 #include <getopt-cdefs.h>
58 #include <getopt-pfx-core.h>
59 #include <getopt-pfx-ext.h>
61 #endif /* _@GUARD_PREFIX@_GETOPT_H */