Blame lib/getopt-cdefs.in.h

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