Debian Codegraph @

lib/getopt.in.h

raw
1 /* Declarations for getopt.
2 Copyright (C) 1989-2026 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.
7
8 This file is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as
10 published by the Free Software Foundation; either version 2.1 of the
11 License, or (at your option) any later version.
12
13 This file is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21 #ifndef _@GUARD_PREFIX@_GETOPT_H
22
23 #if __GNUC__ >= 3
24 @PRAGMA_SYSTEM_HEADER@
25 #endif
26 @PRAGMA_COLUMNS@
27
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 /* Rename the system's 'struct option' to 'struct sys_option',
34 so that we don't have to rename ours to 'struct rpl_option'
35 (which would cause significant trouble in C++ mode). */
36 # define option sys_option
37 # @INCLUDE_NEXT@ @NEXT_GETOPT_H@
38 # undef option
39 # undef _GL_SYSTEM_GETOPT
40 #endif
41
42 #define _@GUARD_PREFIX@_GETOPT_H 1
43
44 /* Standalone applications should #define __GETOPT_PREFIX to an
45 identifier that prefixes the external functions and variables
46 defined in getopt-core.h and getopt-ext.h. When this happens,
47 include the headers that might declare getopt so that they will not
48 cause confusion if included after this file (if the system had
49 <getopt.h>, we have already included it). */
50 #if defined __GETOPT_PREFIX
51 # if !@HAVE_GETOPT_H@
52 # define __need_system_stdlib_h
53 # include <stdlib.h>
54 # undef __need_system_stdlib_h
55 # include <stdio.h>
56 # include <unistd.h>
57 # endif
58 #endif
59
60 /* The definition of _GL_ARG_NONNULL is copied here. */
61
62 #include <getopt-cdefs.h>
63 #include <getopt-pfx-core.h>
64 #include <getopt-pfx-ext.h>
65
66 #endif /* _@GUARD_PREFIX@_GETOPT_H */