Blame argp/argp-namefrob.h

Packit 6c4009
/* Name frobnication for compiling argp outside of glibc
Packit 6c4009
   Copyright (C) 1997-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
   Written by Miles Bader <miles@gnu.ai.mit.edu>.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#if !_LIBC
Packit 6c4009
/* This code is written for inclusion in gnu-libc, and uses names in the
Packit 6c4009
   namespace reserved for libc.  If we're not compiling in libc, define those
Packit 6c4009
   names to be the normal ones instead.  */
Packit 6c4009
Packit 6c4009
/* argp-parse functions */
Packit 6c4009
#undef __argp_parse
Packit 6c4009
#define __argp_parse argp_parse
Packit 6c4009
#undef __option_is_end
Packit 6c4009
#define __option_is_end _option_is_end
Packit 6c4009
#undef __option_is_short
Packit 6c4009
#define __option_is_short _option_is_short
Packit 6c4009
#undef __argp_input
Packit 6c4009
#define __argp_input _argp_input
Packit 6c4009
Packit 6c4009
/* argp-help functions */
Packit 6c4009
#undef __argp_help
Packit 6c4009
#define __argp_help argp_help
Packit 6c4009
#undef __argp_error
Packit 6c4009
#define __argp_error argp_error
Packit 6c4009
#undef __argp_failure
Packit 6c4009
#define __argp_failure argp_failure
Packit 6c4009
#undef __argp_state_help
Packit 6c4009
#define __argp_state_help argp_state_help
Packit 6c4009
#undef __argp_usage
Packit 6c4009
#define __argp_usage argp_usage
Packit 6c4009
Packit 6c4009
/* argp-fmtstream functions */
Packit 6c4009
#undef __argp_make_fmtstream
Packit 6c4009
#define __argp_make_fmtstream argp_make_fmtstream
Packit 6c4009
#undef __argp_fmtstream_free
Packit 6c4009
#define __argp_fmtstream_free argp_fmtstream_free
Packit 6c4009
#undef __argp_fmtstream_putc
Packit 6c4009
#define __argp_fmtstream_putc argp_fmtstream_putc
Packit 6c4009
#undef __argp_fmtstream_puts
Packit 6c4009
#define __argp_fmtstream_puts argp_fmtstream_puts
Packit 6c4009
#undef __argp_fmtstream_write
Packit 6c4009
#define __argp_fmtstream_write argp_fmtstream_write
Packit 6c4009
#undef __argp_fmtstream_printf
Packit 6c4009
#define __argp_fmtstream_printf argp_fmtstream_printf
Packit 6c4009
#undef __argp_fmtstream_set_lmargin
Packit 6c4009
#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
Packit 6c4009
#undef __argp_fmtstream_set_rmargin
Packit 6c4009
#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
Packit 6c4009
#undef __argp_fmtstream_set_wmargin
Packit 6c4009
#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
Packit 6c4009
#undef __argp_fmtstream_point
Packit 6c4009
#define __argp_fmtstream_point argp_fmtstream_point
Packit 6c4009
#undef __argp_fmtstream_update
Packit 6c4009
#define __argp_fmtstream_update _argp_fmtstream_update
Packit 6c4009
#undef __argp_fmtstream_ensure
Packit 6c4009
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
Packit 6c4009
#undef __argp_fmtstream_lmargin
Packit 6c4009
#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
Packit 6c4009
#undef __argp_fmtstream_rmargin
Packit 6c4009
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
Packit 6c4009
#undef __argp_fmtstream_wmargin
Packit 6c4009
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
Packit 6c4009
Packit 6c4009
#include "mempcpy.h"
Packit 6c4009
#include "strcase.h"
Packit 6c4009
#include "strchrnul.h"
Packit 6c4009
#include "strndup.h"
Packit 6c4009
Packit 6c4009
/* normal libc functions we call */
Packit 6c4009
#undef __flockfile
Packit 6c4009
#define __flockfile flockfile
Packit 6c4009
#undef __funlockfile
Packit 6c4009
#define __funlockfile funlockfile
Packit 6c4009
#undef __mempcpy
Packit 6c4009
#define __mempcpy mempcpy
Packit 6c4009
#undef __sleep
Packit 6c4009
#define __sleep sleep
Packit 6c4009
#undef __strcasecmp
Packit 6c4009
#define __strcasecmp strcasecmp
Packit 6c4009
#undef __strchrnul
Packit 6c4009
#define __strchrnul strchrnul
Packit 6c4009
#undef __strerror_r
Packit 6c4009
#define __strerror_r strerror_r
Packit 6c4009
#undef __strndup
Packit 6c4009
#define __strndup strndup
Packit 6c4009
#undef __vsnprintf
Packit 6c4009
#define __vsnprintf vsnprintf
Packit 6c4009
Packit 6c4009
#if defined(HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
Packit 6c4009
# define clearerr_unlocked(x) clearerr (x)
Packit 6c4009
#endif
Packit 6c4009
#if defined(HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
Packit 6c4009
# define feof_unlocked(x) feof (x)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
Packit 6c4009
# define ferror_unlocked(x) ferror (x)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
Packit 6c4009
# define fflush_unlocked(x) fflush (x)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
Packit 6c4009
# define fgets_unlocked(x,y,z) fgets (x,y,z)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FPUTC_UNLOCKED) && !HAVE_DECL_FPUTC_UNLOCKED
Packit 6c4009
# define fputc_unlocked(x,y) fputc (x,y)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
Packit 6c4009
# define fputs_unlocked(x,y) fputs (x,y)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
Packit 6c4009
# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
Packit 6c4009
# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_GETC_UNLOCKED) && !HAVE_DECL_GETC_UNLOCKED
Packit 6c4009
# define getc_unlocked(x) getc (x)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_GETCHAR_UNLOCKED) && !HAVE_DECL_GETCHAR_UNLOCKED
Packit 6c4009
#  define getchar_unlocked() getchar ()
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_PUTC_UNLOCKED) && !HAVE_DECL_PUTC_UNLOCKED
Packit 6c4009
# define putc_unlocked(x,y) putc (x,y)
Packit 6c4009
# endif
Packit 6c4009
#if defined(HAVE_DECL_PUTCHAR_UNLOCKED) && !HAVE_DECL_PUTCHAR_UNLOCKED
Packit 6c4009
# define putchar_unlocked(x) putchar (x)
Packit 6c4009
# endif
Packit 6c4009
Packit 6c4009
extern char *__argp_basename (char *name);
Packit 6c4009
Packit 6c4009
#endif /* !_LIBC */
Packit 6c4009
Packit 6c4009
#ifndef __set_errno
Packit 6c4009
#define __set_errno(e) (errno = (e))
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
Packit 6c4009
# define __argp_short_program_name()	(program_invocation_short_name)
Packit 6c4009
#else
Packit 6c4009
extern char *__argp_short_program_name (void);
Packit 6c4009
#endif