Blame lib/getopt-cdefs.in.h

Packit 33f14e
/* getopt-on-non-glibc compatibility macros.
Packit 33f14e
   Copyright (C) 1989-2017 Free Software Foundation, Inc.
Packit 33f14e
   This file is part of gnulib.
Packit 33f14e
   Unlike most of the getopt implementation, it is NOT shared
Packit 33f14e
   with the GNU C Library.
Packit 33f14e
Packit 33f14e
   gnulib is free software; you can redistribute it and/or modify it
Packit 33f14e
   under the terms of the GNU General Public License as
Packit 33f14e
   published by the Free Software Foundation; either version 3 of
Packit 33f14e
   the License, or (at your option) any later version.
Packit 33f14e
Packit 33f14e
   gnulib is distributed in the hope that it will be useful, but
Packit 33f14e
   WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 33f14e
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 33f14e
   General Public License for more details.
Packit 33f14e
Packit 33f14e
   You should have received a copy of the GNU General Public
Packit 33f14e
   License along with gnulib; if not, see
Packit 33f14e
   <http://www.gnu.org/licenses/>.  */
Packit 33f14e
Packit 33f14e
#ifndef _GETOPT_CDEFS_H
Packit 33f14e
#define _GETOPT_CDEFS_H 1
Packit 33f14e
Packit 33f14e
/* This header should not be used directly; include getopt.h or
Packit 33f14e
   unistd.h instead.  It does not have a protective #error, because
Packit 33f14e
   the guard macro for getopt.h in gnulib is not fixed.  */
Packit 33f14e
Packit 33f14e
/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect
Packit 33f14e
   a number of the internal macros supplied to GNU libc's headers by
Packit 33f14e
   sys/cdefs.h.  Provide fallback definitions for all of them.  */
Packit 33f14e
#if @HAVE_SYS_CDEFS_H@
Packit 33f14e
# include <sys/cdefs.h>
Packit 33f14e
#endif
Packit 33f14e
Packit 33f14e
#ifndef __BEGIN_DECLS
Packit 33f14e
# ifdef __cplusplus
Packit 33f14e
#  define __BEGIN_DECLS extern "C" {
Packit 33f14e
# else
Packit 33f14e
#  define __BEGIN_DECLS /* nothing */
Packit 33f14e
# endif
Packit 33f14e
#endif
Packit 33f14e
#ifndef __END_DECLS
Packit 33f14e
# ifdef __cplusplus
Packit 33f14e
#  define __END_DECLS }
Packit 33f14e
# else
Packit 33f14e
#  define __END_DECLS /* nothing */
Packit 33f14e
# endif
Packit 33f14e
#endif
Packit 33f14e
Packit 33f14e
#ifndef __GNUC_PREREQ
Packit 33f14e
# if defined __GNUC__ && defined __GNUC_VERSION__
Packit 33f14e
# define __GNUC_PREREQ(maj, min) \
Packit 33f14e
        ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
Packit 33f14e
# else
Packit 33f14e
#  define __GNUC_PREREQ(maj, min) 0
Packit 33f14e
# endif
Packit 33f14e
#endif
Packit 33f14e
Packit 33f14e
#ifndef __THROW
Packit 33f14e
# if defined __cplusplus && __GNUC_PREREQ (2,8)
Packit 33f14e
#  define __THROW       throw ()
Packit 33f14e
# else
Packit 33f14e
#  define __THROW
Packit 33f14e
# endif
Packit 33f14e
#endif
Packit 33f14e
Packit 33f14e
#endif /* _GETOPT_CDEFS_H */