Blame gnulib/lib/getopt-pfx-core.h

Packit Service a2ae7a
/* getopt (basic, portable features) gnulib wrapper header.
Packit Service a2ae7a
   Copyright (C) 1989-2019 Free Software Foundation, Inc.
Packit Service a2ae7a
   This file is part of gnulib.
Packit Service a2ae7a
   Unlike most of the getopt implementation, it is NOT shared
Packit Service a2ae7a
   with the GNU C Library.
Packit Service a2ae7a
Packit Service a2ae7a
   This file is free software; you can redistribute it and/or modify it
Packit Service a2ae7a
   under the terms of the GNU Lesser General Public License as
Packit Service a2ae7a
   published by the Free Software Foundation; either version 2.1 of
Packit Service a2ae7a
   the License, or (at your option) any later version.
Packit Service a2ae7a
Packit Service a2ae7a
   This file is distributed in the hope that it will be useful, but
Packit Service a2ae7a
   WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2ae7a
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a2ae7a
   Lesser General Public License for more details.
Packit Service a2ae7a
Packit Service a2ae7a
   You should have received a copy of the GNU Lesser General Public
Packit Service a2ae7a
   License along with gnulib; if not, see
Packit Service a2ae7a
   <https://www.gnu.org/licenses/>.  */
Packit Service a2ae7a
Packit Service a2ae7a
#ifndef _GETOPT_PFX_CORE_H
Packit Service a2ae7a
#define _GETOPT_PFX_CORE_H 1
Packit Service a2ae7a
Packit Service a2ae7a
/* This header should not be used directly; include getopt.h or
Packit Service a2ae7a
   unistd.h instead.  It does not have a protective #error, because
Packit Service a2ae7a
   the guard macro for getopt.h in gnulib is not fixed.  */
Packit Service a2ae7a
Packit Service a2ae7a
/* Standalone applications should #define __GETOPT_PREFIX to an
Packit Service a2ae7a
   identifier that prefixes the external functions and variables
Packit Service a2ae7a
   defined in getopt-core.h and getopt-ext.h.  Systematically
Packit Service a2ae7a
   rename identifiers so that they do not collide with the system
Packit Service a2ae7a
   functions and variables.  Renaming avoids problems with some
Packit Service a2ae7a
   compilers and linkers.  */
Packit Service a2ae7a
#ifdef __GETOPT_PREFIX
Packit Service a2ae7a
# ifndef __GETOPT_ID
Packit Service a2ae7a
#  define __GETOPT_CONCAT(x, y) x ## y
Packit Service a2ae7a
#  define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
Packit Service a2ae7a
#  define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
Packit Service a2ae7a
# endif
Packit Service a2ae7a
# undef getopt
Packit Service a2ae7a
# undef optarg
Packit Service a2ae7a
# undef opterr
Packit Service a2ae7a
# undef optind
Packit Service a2ae7a
# undef optopt
Packit Service a2ae7a
# define getopt __GETOPT_ID (getopt)
Packit Service a2ae7a
# define optarg __GETOPT_ID (optarg)
Packit Service a2ae7a
# define opterr __GETOPT_ID (opterr)
Packit Service a2ae7a
# define optind __GETOPT_ID (optind)
Packit Service a2ae7a
# define optopt __GETOPT_ID (optopt)
Packit Service a2ae7a
Packit Service a2ae7a
/* The system's getopt.h may have already included getopt-core.h to
Packit Service a2ae7a
   declare the unprefixed identifiers.  Undef _GETOPT_CORE_H so that
Packit Service a2ae7a
   getopt-core.h declares them with prefixes.  */
Packit Service a2ae7a
# undef _GETOPT_CORE_H
Packit Service a2ae7a
#endif
Packit Service a2ae7a
Packit Service a2ae7a
#include <getopt-core.h>
Packit Service a2ae7a
Packit Service a2ae7a
#endif /* _GETOPT_PFX_CORE_H */