CMake: Keep existing options in LIBS when adding -lrt
[xz/debian.git] / lib / getopt.in.h
blob6d602c5da24c803f83dc5da02864b95b3e7d8f52
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 /* Declarations for getopt.
4 Copyright (C) 1989-2023 Free Software Foundation, Inc.
5 This file is part of gnulib.
6 Unlike most of the getopt implementation, it is NOT shared
7 with the GNU C Library, which supplies a different version of
8 this file.
10 This file is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as
12 published by the Free Software Foundation; either version 2.1 of the
13 License, or (at your option) any later version.
15 This file is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with this program. If not, see <https://www.gnu.org/licenses/>. */
23 #ifndef _GETOPT_H
25 #define _GETOPT_H 1
27 /* Standalone applications should #define __GETOPT_PREFIX to an
28 identifier that prefixes the external functions and variables
29 defined in this header. When this happens, include the
30 headers that might declare getopt so that they will not cause
31 confusion if included after this file. Then systematically rename
32 identifiers so that they do not collide with the system functions
33 and variables. Renaming avoids problems with some compilers and
34 linkers. */
35 #if defined __GETOPT_PREFIX
36 # include <stdlib.h>
37 # include <stdio.h>
39 # ifndef _MSC_VER
40 # include <unistd.h>
41 # endif
42 #endif
44 /* From Gnulib's lib/arg-nonnull.h: */
45 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
46 that the values passed as arguments n, ..., m must be non-NULL pointers.
47 n = 1 stands for the first argument, n = 2 for the second argument etc. */
48 #ifndef _GL_ARG_NONNULL
49 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
50 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
51 # else
52 # define _GL_ARG_NONNULL(params)
53 # endif
54 #endif
56 #include <getopt-cdefs.h>
57 #include <getopt-pfx-core.h>
58 #include <getopt-pfx-ext.h>
60 #endif /* _GETOPT_H */