Blame gl/libc-config.h

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