Blame lib/libc-config.h

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