Tests: Add two RISC-V Filter test files.
[xz.git] / lib / getopt.in.h
blob79941d442cd5930cfaeb334d6a9d366ac30b8869
1 /* Declarations for getopt.
2 Copyright (C) 1989-2023 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
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.
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.
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/>. */
21 #ifndef _GETOPT_H
23 #define _GETOPT_H 1
25 /* Standalone applications should #define __GETOPT_PREFIX to an
26 identifier that prefixes the external functions and variables
27 defined in this header. When this happens, include the
28 headers that might declare getopt so that they will not cause
29 confusion if included after this file. Then systematically rename
30 identifiers so that they do not collide with the system functions
31 and variables. Renaming avoids problems with some compilers and
32 linkers. */
33 #if defined __GETOPT_PREFIX
34 # include <stdlib.h>
35 # include <stdio.h>
37 # ifndef _MSC_VER
38 # include <unistd.h>
39 # endif
40 #endif
42 /* From Gnulib's lib/arg-nonnull.h: */
43 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
44 that the values passed as arguments n, ..., m must be non-NULL pointers.
45 n = 1 stands for the first argument, n = 2 for the second argument etc. */
46 #ifndef _GL_ARG_NONNULL
47 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
48 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
49 # else
50 # define _GL_ARG_NONNULL(params)
51 # endif
52 #endif
54 #include <getopt-cdefs.h>
55 #include <getopt-pfx-core.h>
56 #include <getopt-pfx-ext.h>
58 #endif /* _GETOPT_H */