Blame lib/getopt-cdefs.in.h

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