2024-02-12 15:09:10 +00:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
|
2007-12-08 22:42:33 +00:00
|
|
|
/* Declarations for getopt.
|
2023-09-22 19:27:00 +00:00
|
|
|
Copyright (C) 1989-2023 Free Software Foundation, Inc.
|
|
|
|
This file is part of gnulib.
|
|
|
|
Unlike most of the getopt implementation, it is NOT shared
|
|
|
|
with the GNU C Library, which supplies a different version of
|
|
|
|
this file.
|
|
|
|
|
|
|
|
This file is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This file is distributed in the hope that it will be useful,
|
2007-12-08 22:42:33 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2008-11-19 18:46:52 +00:00
|
|
|
GNU Lesser General Public License for more details.
|
2007-12-08 22:42:33 +00:00
|
|
|
|
2023-09-22 19:27:00 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
2007-12-08 22:42:33 +00:00
|
|
|
|
|
|
|
#ifndef _GETOPT_H
|
|
|
|
|
2023-09-22 19:27:00 +00:00
|
|
|
#define _GETOPT_H 1
|
2007-12-08 22:42:33 +00:00
|
|
|
|
|
|
|
/* Standalone applications should #define __GETOPT_PREFIX to an
|
|
|
|
identifier that prefixes the external functions and variables
|
|
|
|
defined in this header. When this happens, include the
|
|
|
|
headers that might declare getopt so that they will not cause
|
|
|
|
confusion if included after this file. Then systematically rename
|
|
|
|
identifiers so that they do not collide with the system functions
|
|
|
|
and variables. Renaming avoids problems with some compilers and
|
|
|
|
linkers. */
|
2023-09-22 19:27:00 +00:00
|
|
|
#if defined __GETOPT_PREFIX
|
2007-12-08 22:42:33 +00:00
|
|
|
# include <stdlib.h>
|
|
|
|
# include <stdio.h>
|
2023-09-22 19:27:00 +00:00
|
|
|
|
2023-09-05 11:37:50 +00:00
|
|
|
# ifndef _MSC_VER
|
|
|
|
# include <unistd.h>
|
|
|
|
# endif
|
2007-12-08 22:42:33 +00:00
|
|
|
#endif
|
|
|
|
|
2023-09-22 19:27:00 +00:00
|
|
|
/* From Gnulib's lib/arg-nonnull.h: */
|
|
|
|
/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
|
|
|
|
that the values passed as arguments n, ..., m must be non-NULL pointers.
|
|
|
|
n = 1 stands for the first argument, n = 2 for the second argument etc. */
|
|
|
|
#ifndef _GL_ARG_NONNULL
|
|
|
|
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
|
|
|
|
# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
|
2007-12-08 22:42:33 +00:00
|
|
|
# else
|
2023-09-22 19:27:00 +00:00
|
|
|
# define _GL_ARG_NONNULL(params)
|
2007-12-08 22:42:33 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2023-09-22 19:27:00 +00:00
|
|
|
#include <getopt-cdefs.h>
|
|
|
|
#include <getopt-pfx-core.h>
|
|
|
|
#include <getopt-pfx-ext.h>
|
2007-12-08 22:42:33 +00:00
|
|
|
|
2023-09-22 19:27:00 +00:00
|
|
|
#endif /* _GETOPT_H */
|