Blame lib/getopt-pfx-core.h

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