new file mode 100644
@@ -0,0 +1,39 @@
+/* Properties of long double type.
+ Copyright (C) 2016 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 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/>. */
+
+/* This header is included by <sys/cdefs.h>.
+
+ If long double is ABI-compatible with double, it should define
+ __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
+ __NO_LONG_DOUBLE_MATH undefined.
+
+ If this build of the GNU C Library supports both long double
+ ABI-compatible with double and some other long double format not
+ ABI-compatible with double, it should define
+ __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
+ __LONG_DOUBLE_MATH_OPTIONAL undefined.
+
+ If is already defined, this header must not define
+ anything; this is needed to work with the definition of
+ __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */
+
+/* In the default version of this header, long double is
+ ABI-compatible with double. */
+#ifndef __NO_LONG_DOUBLE_MATH
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
@@ -48,9 +48,3 @@ typedef double double_t; /* `double' expressions are evaluated as
#endif
#endif /* ISO C99 */
-
-#ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'. The disables the
- declaration of all the `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
@@ -27,7 +27,8 @@ headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
fpu_control.h complex.h bits/cmathcalls.h fenv.h \
bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \
bits/math-finite.h bits/math-vector.h \
- bits/libm-simd-decl-stubs.h bits/iscanonical.h
+ bits/libm-simd-decl-stubs.h bits/iscanonical.h \
+ bits/long-double.h
# FPU support code.
aux := setfpucw fpu_control
@@ -439,6 +439,7 @@
#endif
#include <bits/wordsize.h>
+#include <bits/long-double.h>
#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
# define __LDBL_COMPAT 1
@@ -20,7 +20,7 @@
/* The actual implementation for all floating point sizes is in strtod.c.
These macros tell it to produce the `float' version, `strtof'. */
-#include <bits/wordsize.h>
+#include <bits/long-double.h>
#ifdef __LONG_DOUBLE_MATH_OPTIONAL
# include <wchar.h>
@@ -47,9 +47,3 @@ typedef double double_t; /* `double' expressions are evaluated as
# endif
#endif /* ISO C99 */
-
-#ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'. This disables the
- declaration of all the `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
@@ -33,11 +33,3 @@ typedef double double_t; /* `double' expressions are evaluated as
# define FP_ILOGBNAN (2147483647)
#endif /* ISO C99 */
-
-#ifndef __NO_LONG_DOUBLE_MATH
-/* On hppa `long double' and `double' are 64-bits. So, libm is built
- with NO_LONG_DOUBLE defined. The following define ensures the library
- and headers are consistent. This disables the declaration of all the
- `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
new file mode 100644
@@ -0,0 +1,20 @@
+/* Properties of long double type. ldbl-128 version.
+ Copyright (C) 2016 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 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/>. */
+
+/* long double is distinct from double, so there is nothing to
+ define here. */
new file mode 100644
@@ -0,0 +1,20 @@
+/* Properties of long double type. ldbl-96 version.
+ Copyright (C) 2016 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 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/>. */
+
+/* long double is distinct from double, so there is nothing to
+ define here. */
new file mode 100644
@@ -0,0 +1,24 @@
+/* Properties of long double type. ldbl-opt version.
+ Copyright (C) 2016 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 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 __NO_LONG_DOUBLE_MATH
+# define __LONG_DOUBLE_MATH_OPTIONAL 1
+# ifndef __LONG_DOUBLE_128__
+# define __NO_LONG_DOUBLE_MATH 1
+# endif
+#endif
new file mode 100644
@@ -0,0 +1,23 @@
+/* Properties of long double type. MIPS version.
+ Copyright (C) 2016 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 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/>. */
+
+#include <sgidefs.h>
+
+#if !defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
@@ -19,8 +19,6 @@
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#include <sgidefs.h>
-
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
@@ -35,9 +33,3 @@ typedef double double_t; /* `double' expressions are evaluated as
# define FP_ILOGBNAN 2147483647
#endif /* ISO C99 */
-
-#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
-/* Signal that we do not really have a `long double'. This disables the
- declaration of all the `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
@@ -9,14 +9,3 @@
#endif
#define __WORDSIZE_TIME64_COMPAT32 0
-
-#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
-
-/* Signal that we didn't used to have a `long double'. The changes all
- the `long double' function variants to be redirects to the double
- functions. */
-# define __LONG_DOUBLE_MATH_OPTIONAL 1
-# ifndef __LONG_DOUBLE_128__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-#endif
@@ -9,14 +9,3 @@
#endif
#define __WORDSIZE_TIME64_COMPAT32 0
-
-#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
-
-/* Signal that we didn't used to have a `long double'. The changes all
- the `long double' function variants to be redirects to the double
- functions. */
-# define __LONG_DOUBLE_MATH_OPTIONAL 1
-# ifndef __LONG_DOUBLE_128__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-#endif
@@ -38,9 +38,3 @@ typedef double double_t;
# define FP_ILOGBNAN 0x7fffffff
#endif /* ISO C99 */
-
-#ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'. The disables the
- declaration of all the `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
@@ -46,9 +46,3 @@ typedef double double_t;
# endif
#endif /* ISO C99 */
-
-#ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'. This disables the
- declaration of all the `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
@@ -17,14 +17,3 @@
#define __WORDSIZE 64
#define __WORDSIZE_TIME64_COMPAT32 0
-
-#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
-
-/* Signal that we didn't used to have a `long double'. The changes all
- the `long double' function variants to be redirects to the double
- functions. */
-# define __LONG_DOUBLE_MATH_OPTIONAL 1
-# ifndef __LONG_DOUBLE_128__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-#endif
@@ -9,14 +9,3 @@
# define __WORDSIZE32_SIZE_ULONG 0
# define __WORDSIZE32_PTRDIFF_LONG 0
#endif
-
-#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
-
-/* Signal the glibc ABI didn't used to have a `long double'.
- The changes all the `long double' function variants to be redirects
- to the double functions. */
-# define __LONG_DOUBLE_MATH_OPTIONAL 1
-# ifndef __LONG_DOUBLE_128__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-#endif
new file mode 100644
@@ -0,0 +1,26 @@
+/* Properties of long double type. SPARC version.
+ Copyright (C) 2016 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 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/>. */
+
+#include <bits/wordsize.h>
+
+#if !defined __NO_LONG_DOUBLE_MATH && __WORDSIZE == 32
+# define __LONG_DOUBLE_MATH_OPTIONAL 1
+# ifndef __LONG_DOUBLE_128__
+# define __NO_LONG_DOUBLE_MATH 1
+# endif
+#endif
@@ -9,16 +9,3 @@
# define __WORDSIZE32_PTRDIFF_LONG 0
# define __WORDSIZE_TIME64_COMPAT32 0
#endif
-
-#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
-
-# if __WORDSIZE == 32
-/* Signal that in 32bit ABI we didn't used to have a `long double'.
- The changes all the `long double' function variants to be redirects
- to the double functions. */
-# define __LONG_DOUBLE_MATH_OPTIONAL 1
-# ifndef __LONG_DOUBLE_128__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-# endif
-#endif