Blame gl/libc-config.h

Packit Service 4684c1
/* System definitions for code taken from the GNU C Library
Packit Service 4684c1
Packit Service 4684c1
   Copyright 2017-2020 Free Software Foundation, Inc.
Packit Service 4684c1
Packit Service 4684c1
   This program is free software; you can redistribute it and/or
Packit Service 4684c1
   modify it under the terms of the GNU Lesser General Public
Packit Service 4684c1
   License as published by the Free Software Foundation; either
Packit Service 4684c1
   version 2.1 of the License, or (at your option) any later version.
Packit Service 4684c1
Packit Service 4684c1
   This program is distributed in the hope that it will be useful,
Packit Service 4684c1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 4684c1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 4684c1
   Lesser General Public License for more details.
Packit Service 4684c1
Packit Service 4684c1
   You should have received a copy of the GNU Lesser General Public
Packit Service 4684c1
   License along with this program; if not, see
Packit Service 4684c1
   <https://www.gnu.org/licenses/>.  */
Packit Service 4684c1
Packit Service 4684c1
/* Written by Paul Eggert.  */
Packit Service 4684c1
Packit Service 4684c1
/* This is intended to be a good-enough substitute for glibc system
Packit Service 4684c1
   macros like those defined in <sys/cdefs.h>, so that Gnulib code
Packit Service 4684c1
   shared with glibc can do this as the first #include:
Packit Service 4684c1
Packit Service 4684c1
     #ifndef _LIBC
Packit Service 4684c1
     # include <libc-config.h>
Packit Service 4684c1
     #endif
Packit Service 4684c1
Packit Service 4684c1
   When compiled as part of glibc this is a no-op; when compiled as
Packit Service 4684c1
   part of Gnulib this includes Gnulib's <config.h> and defines macros
Packit Service 4684c1
   that glibc library code would normally assume.  */
Packit Service 4684c1
Packit Service 4684c1
#include <config.h>
Packit Service 4684c1
Packit Service 4684c1
/* On glibc this includes <features.h> and <sys/cdefs.h> and #defines
Packit Service 4684c1
   _FEATURES_H, __WORDSIZE, and __set_errno.  On FreeBSD 11 it
Packit Service 4684c1
   includes <sys/cdefs.h> which defines __nonnull.  Elsewhere it
Packit Service 4684c1
   is harmless.  */
Packit Service 4684c1
#include <errno.h>
Packit Service 4684c1
Packit Service 4684c1
/* From glibc <errno.h>.  */
Packit Service 4684c1
#ifndef __set_errno
Packit Service 4684c1
# define __set_errno(val) (errno = (val))
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/* From glibc <features.h>.  */
Packit Service 4684c1
Packit Service 4684c1
#ifndef __GNUC_PREREQ
Packit Service 4684c1
# if defined __GNUC__ && defined __GNUC_MINOR__
Packit Service 4684c1
#  define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <= __GNUC_MINOR__))
Packit Service 4684c1
# else
Packit Service 4684c1
#  define __GNUC_PREREQ(maj, min) 0
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#ifndef __glibc_clang_prereq
Packit Service 4684c1
# if defined __clang_major__ && defined __clang_minor__
Packit Service 4684c1
#  ifdef __apple_build_version__
Packit Service 4684c1
/* Apple for some reason renumbers __clang_major__ and __clang_minor__.
Packit Service 4684c1
   Gnulib code uses only __glibc_clang_prereq (3, 5); map it to
Packit Service 4684c1
   6000000 <= __apple_build_version__.  Support for other calls to
Packit Service 4684c1
   __glibc_clang_prereq can be added here as needed.  */
Packit Service 4684c1
#   define __glibc_clang_prereq(maj, min) \
Packit Service 4684c1
      ((maj) == 3 && (min) == 5 ? 6000000 <= __apple_build_version__ : 0)
Packit Service 4684c1
#  else
Packit Service 4684c1
#   define __glibc_clang_prereq(maj, min) \
Packit Service 4684c1
      ((maj) < __clang_major__ + ((min) <= __clang_minor__))
Packit Service 4684c1
#  endif
Packit Service 4684c1
# else
Packit Service 4684c1
#  define __glibc_clang_prereq(maj, min) 0
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* Prepare to include <cdefs.h>, which is our copy of glibc
Packit Service 4684c1
   <sys/cdefs.h>.  */
Packit Service 4684c1
Packit Service 4684c1
/* Define _FEATURES_H so that <cdefs.h> does not include <features.h>.  */
Packit Service 4684c1
#ifndef _FEATURES_H
Packit Service 4684c1
# define _FEATURES_H 1
Packit Service 4684c1
#endif
Packit Service 4684c1
/* Define __WORDSIZE so that <cdefs.h> does not attempt to include
Packit Service 4684c1
   nonexistent files.  Make it a syntax error, since Gnulib does not
Packit Service 4684c1
   use __WORDSIZE now, and if Gnulib uses it later the syntax error
Packit Service 4684c1
   will let us know that __WORDSIZE needs configuring.  */
Packit Service 4684c1
#ifndef __WORDSIZE
Packit Service 4684c1
# define __WORDSIZE %%%
Packit Service 4684c1
#endif
Packit Service 4684c1
/* Undef the macros unconditionally defined by our copy of glibc
Packit Service 4684c1
   <sys/cdefs.h>, so that they do not clash with any system-defined
Packit Service 4684c1
   versions.  */
Packit Service 4684c1
#undef _SYS_CDEFS_H
Packit Service 4684c1
#undef __ASMNAME
Packit Service 4684c1
#undef __ASMNAME2
Packit Service 4684c1
#undef __BEGIN_DECLS
Packit Service 4684c1
#undef __CONCAT
Packit Service 4684c1
#undef __END_DECLS
Packit Service 4684c1
#undef __HAVE_GENERIC_SELECTION
Packit Service 4684c1
#undef __LDBL_COMPAT
Packit Service 4684c1
#undef __LDBL_REDIR
Packit Service 4684c1
#undef __LDBL_REDIR1
Packit Service 4684c1
#undef __LDBL_REDIR1_DECL
Packit Service 4684c1
#undef __LDBL_REDIR1_NTH
Packit Service 4684c1
#undef __LDBL_REDIR_DECL
Packit Service 4684c1
#undef __LDBL_REDIR_NTH
Packit Service 4684c1
#undef __LEAF
Packit Service 4684c1
#undef __LEAF_ATTR
Packit Service 4684c1
#undef __NTH
Packit Service 4684c1
#undef __NTHNL
Packit Service 4684c1
#undef __P
Packit Service 4684c1
#undef __PMT
Packit Service 4684c1
#undef __REDIRECT
Packit Service 4684c1
#undef __REDIRECT_LDBL
Packit Service 4684c1
#undef __REDIRECT_NTH
Packit Service 4684c1
#undef __REDIRECT_NTHNL
Packit Service 4684c1
#undef __REDIRECT_NTH_LDBL
Packit Service 4684c1
#undef __STRING
Packit Service 4684c1
#undef __THROW
Packit Service 4684c1
#undef __THROWNL
Packit Service 4684c1
#undef __always_inline
Packit Service 4684c1
#undef __attribute__
Packit Service 4684c1
#undef __attribute_alloc_size__
Packit Service 4684c1
#undef __attribute_artificial__
Packit Service 4684c1
#undef __attribute_const__
Packit Service 4684c1
#undef __attribute_deprecated__
Packit Service 4684c1
#undef __attribute_deprecated_msg__
Packit Service 4684c1
#undef __attribute_format_arg__
Packit Service 4684c1
#undef __attribute_format_strfmon__
Packit Service 4684c1
#undef __attribute_malloc__
Packit Service 4684c1
#undef __attribute_noinline__
Packit Service 4684c1
#undef __attribute_nonstring__
Packit Service 4684c1
#undef __attribute_pure__
Packit Service 4684c1
#undef __attribute_used__
Packit Service 4684c1
#undef __attribute_warn_unused_result__
Packit Service 4684c1
#undef __bos
Packit Service 4684c1
#undef __bos0
Packit Service 4684c1
#undef __errordecl
Packit Service 4684c1
#undef __extension__
Packit Service 4684c1
#undef __extern_always_inline
Packit Service 4684c1
#undef __extern_inline
Packit Service 4684c1
#undef __flexarr
Packit Service 4684c1
#undef __fortify_function
Packit Service 4684c1
#undef __glibc_c99_flexarr_available
Packit Service 4684c1
#undef __glibc_clang_has_extension
Packit Service 4684c1
#undef __glibc_likely
Packit Service 4684c1
#undef __glibc_macro_warning
Packit Service 4684c1
#undef __glibc_macro_warning1
Packit Service 4684c1
#undef __glibc_unlikely
Packit Service 4684c1
#undef __inline
Packit Service 4684c1
#undef __ptr_t
Packit Service 4684c1
#undef __restrict
Packit Service 4684c1
#undef __restrict_arr
Packit Service 4684c1
#undef __va_arg_pack
Packit Service 4684c1
#undef __va_arg_pack_len
Packit Service 4684c1
#undef __warnattr
Packit Service 4684c1
#undef __warndecl
Packit Service 4684c1
Packit Service 4684c1
/* Include our copy of glibc <sys/cdefs.h>.  */
Packit Service 4684c1
#include <cdefs.h>
Packit Service 4684c1
Packit Service 4684c1
/* <cdefs.h> __inline is too pessimistic for non-GCC.  */
Packit Service 4684c1
#undef __inline
Packit Service 4684c1
#ifndef HAVE___INLINE
Packit Service 4684c1
# if 199901 <= __STDC_VERSION__ || defined inline
Packit Service 4684c1
#  define __inline inline
Packit Service 4684c1
# else
Packit Service 4684c1
#  define __inline
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* A substitute for glibc <libc-symbols.h>, good enough for Gnulib.  */
Packit Service 4684c1
#define attribute_hidden
Packit Service 4684c1
#define libc_hidden_proto(name, ...)
Packit Service 4684c1
#define libc_hidden_def(name)
Packit Service 4684c1
#define libc_hidden_weak(name)
Packit Service 4684c1
#define libc_hidden_ver(local, name)
Packit Service 4684c1
#define strong_alias(name, aliasname)
Packit Service 4684c1
#define weak_alias(name, aliasname)
Packit Service 4684c1
Packit Service 4684c1
/* A substitute for glibc <shlib-compat.h>, good enough for Gnulib.  */
Packit Service 4684c1
#define SHLIB_COMPAT(lib, introduced, obsoleted) 0
Packit Service 4684c1
#define versioned_symbol(lib, local, symbol, version)