Blame sysdeps/generic/gcc-compat.h

Packit Service 82fcde
/* Macros for checking required GCC compatibility.  Generic version.
Packit Service 82fcde
   Copyright (C) 2014-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
/* This is the base file.  More-specific sysdeps/.../gcc-compat.h files
Packit Service 82fcde
   can define GCC_COMPAT_VERSION and then #include_next this file.  */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _GENERIC_GCC_COMPAT_H
Packit Service 82fcde
#define _GENERIC_GCC_COMPAT_H 1
Packit Service 82fcde
Packit Service 82fcde
/* This is the macro that gets used in #if tests in code: true iff
Packit Service 82fcde
   the library we build must be compatible with user code built by
Packit Service 82fcde
   GCC version MAJOR.MINOR.  */
Packit Service 82fcde
#define GCC_COMPAT(major, minor)        \
Packit Service 82fcde
  (GCC_COMPAT_VERSION <= GCC_VERSION (major, minor))
Packit Service 82fcde
Packit Service 82fcde
/* This is how we compose an integer from major and minor version
Packit Service 82fcde
   numbers, for comparison.  */
Packit Service 82fcde
#define GCC_VERSION(major, minor)       \
Packit Service 82fcde
  (((major) << 16) + (minor))
Packit Service 82fcde
Packit Service 82fcde
#ifndef GCC_COMPAT_VERSION
Packit Service 82fcde
/* GCC 2.7.2 was current at the time of the glibc-2.0 release.
Packit Service 82fcde
   We assume nothing before that ever mattered.  */
Packit Service 82fcde
# define GCC_COMPAT_VERSION     GCC_VERSION (2, 7)
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
#endif