Blame lib/getopt-cdefs.in.h

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