2018-02-01 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/generic/ldbl-classify-compat.h: New file.
+ * sysdeps/arm/ldbl-classify-compat.h: Likewise.
+ * sysdeps/m68k/coldfire/ldbl-classify-compat.h: Likewise.
+ * sysdeps/microblaze/ldbl-classify-compat.h: Likewise.
+ * sysdeps/mips/ldbl-classify-compat.h: Likewise.
+ * sysdeps/nios2/ldbl-classify-compat.h: Likewise.
+ * sysdeps/sh/ldbl-classify-compat.h: Likewise.
+ * sysdeps/ieee754/dbl-64/s_finite.c: Include
+ <ldbl-classify-compat.h>.
+ [LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
+ * sysdeps/ieee754/dbl-64/s_isinf.c: Include
+ <ldbl-classify-compat.h>.
+ [LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
+ * sysdeps/ieee754/dbl-64/s_isnan.c: Include
+ <ldbl-classify-compat.h>.
+ [LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c: Include
+ <ldbl-classify-compat.h>.
+ [LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_isinf.c: Include
+ <ldbl-classify-compat.h>.
+ [LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c: Include
+ <ldbl-classify-compat.h>.
+ [LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
+ * sysdeps/arm/math_private.h (LDBL_CLASSIFY_COMPAT): Remove macro.
+ * sysdeps/mips/math_private.h (LDBL_CLASSIFY_COMPAT): Likewise.
+ * sysdeps/m68k/coldfire/math_private.h: Remove file.
+ * sysdeps/microblaze/math_private.h: Likewise.
+ * sysdeps/nios2/math_private.h: Likewise.
+ * sysdeps/sh/math_private.h: Likewise.
+
* sysdeps/m68k/coldfire/fpu/math_private.h: Move to ....
* sysdeps/m68k/coldfire/math_private.h: ... here.
* sysdeps/m68k/coldfire/nofpu/math_private.h: Remove file.
-#ifndef SH_MATH_PRIVATE_H
-#define SH_MATH_PRIVATE_H 1
+#ifndef ARM_LDBL_CLASSIFY_COMPAT_H
+#define ARM_LDBL_CLASSIFY_COMPAT_H 1
/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
when built without long double support. */
#define LDBL_CLASSIFY_COMPAT 1
-#include_next <math_private.h>
-
#endif
#ifndef ARM_MATH_PRIVATE_H
#define ARM_MATH_PRIVATE_H 1
-/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
- when built without long double support. */
-#define LDBL_CLASSIFY_COMPAT 1
-
#include "fenv_private.h"
#include_next <math_private.h>
--- /dev/null
+/* Specify whether there should be compat symbol aliases for some
+ classification functions. Generic version.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _LDBL_CLASSIFY_COMPAT_H
+#define _LDBL_CLASSIFY_COMPAT_H 1
+
+/* If defined to 1, enable __finitel, __isinfl, and __isnanl function
+ aliases for binary compatibility when built without long double
+ support. If defined to 0, or if long double does not have the same
+ format as double, there are no such aliases. New ports should use
+ the default definition of this as 0, as such
+ implementation-namespace functions should only have one exported
+ name per floating-point format, not one per floating-point
+ type. */
+#define LDBL_CLASSIFY_COMPAT 0
+
+#endif /* ldbl-classify-compat.h */
#include <math.h>
#include <math_private.h>
+#include <ldbl-classify-compat.h>
#include <shlib-compat.h>
#undef __finite
hidden_def (__finite)
weak_alias (__finite, finite)
#ifdef NO_LONG_DOUBLE
-# ifdef LDBL_CLASSIFY_COMPAT
+# if LDBL_CLASSIFY_COMPAT
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
# endif
#include <math.h>
#include <math_private.h>
+#include <ldbl-classify-compat.h>
#include <shlib-compat.h>
int
hidden_def (__isinf)
weak_alias (__isinf, isinf)
#ifdef NO_LONG_DOUBLE
-# if defined LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+# if LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
# endif
weak_alias (__isinf, isinfl)
#include <math.h>
#include <math_private.h>
+#include <ldbl-classify-compat.h>
#include <shlib-compat.h>
#undef __isnan
hidden_def (__isnan)
weak_alias (__isnan, isnan)
#ifdef NO_LONG_DOUBLE
-# if defined LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+# if LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
# endif
weak_alias (__isnan, isnanl)
#include <math.h>
#include <math_private.h>
+#include <ldbl-classify-compat.h>
#include <shlib-compat.h>
#include <stdint.h>
hidden_def (__finite)
weak_alias (__finite, finite)
#ifdef NO_LONG_DOUBLE
-# ifdef LDBL_CLASSIFY_COMPAT
+# if LDBL_CLASSIFY_COMPAT
# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
# endif
#include <math.h>
#include <math_private.h>
+#include <ldbl-classify-compat.h>
#include <shlib-compat.h>
int
hidden_def (__isinf)
weak_alias (__isinf, isinf)
#ifdef NO_LONG_DOUBLE
-# if defined LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+# if LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
# endif
weak_alias (__isinf, isinfl)
#include <math.h>
#include <math_private.h>
+#include <ldbl-classify-compat.h>
#include <shlib-compat.h>
#include <stdint.h>
hidden_def (__isnan)
weak_alias (__isnan, isnan)
#ifdef NO_LONG_DOUBLE
-# if defined LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+# if LDBL_CLASSIFY_COMPAT && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
# endif
weak_alias (__isnan, isnanl)
-#ifndef NIO2_MATH_PRIVATE_H
-#define NIO2_MATH_PRIVATE_H 1
+#ifndef COLDFIRE_LDBL_CLASSIFY_COMPAT_H
+#define COLDFIRE_LDBL_CLASSIFY_COMPAT_H 1
/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
when built without long double support. */
#define LDBL_CLASSIFY_COMPAT 1
-#include_next <math_private.h>
-
#endif
-#ifndef COLDFIRE_MATH_PRIVATE_H
-#define COLDFIRE_MATH_PRIVATE_H 1
+#ifndef MICROBLAZE_LDBL_CLASSIFY_COMPAT_H
+#define MICROBLAZE_LDBL_CLASSIFY_COMPAT_H 1
/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
when built without long double support. */
#define LDBL_CLASSIFY_COMPAT 1
-#include_next <math_private.h>
-
#endif
-#ifndef MICROBLAZE_MATH_PRIVATE_H
-#define MICROBLAZE_MATH_PRIVATE_H 1
+#ifndef MIPS_LDBL_CLASSIFY_COMPAT_H
+#define MIPS_LDBL_CLASSIFY_COMPAT_H 1
/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
when built without long double support. */
#define LDBL_CLASSIFY_COMPAT 1
-#include_next <math_private.h>
-
#endif
#endif
-/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
- when built without long double support. */
-#define LDBL_CLASSIFY_COMPAT 1
-
#include_next <math_private.h>
#endif
--- /dev/null
+#ifndef NIOS2_LDBL_CLASSIFY_COMPAT_H
+#define NIOS2_LDBL_CLASSIFY_COMPAT_H 1
+
+/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
+ when built without long double support. */
+#define LDBL_CLASSIFY_COMPAT 1
+
+#endif
--- /dev/null
+#ifndef SH_LDBL_CLASSIFY_COMPAT_H
+#define SH_LDBL_CLASSIFY_COMPAT_H 1
+
+/* Enable __finitel, __isinfl, and __isnanl for binary compatibility
+ when built without long double support. */
+#define LDBL_CLASSIFY_COMPAT 1
+
+#endif