This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] math: Merge strtod_nam_*.h into math-type-macros-*.h
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Rafal Luzynski <digitalfreak at lingonborough dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 17 May 2018 08:29:23 +0200
- Subject: Re: [PATCH] math: Merge strtod_nam_*.h into math-type-macros-*.h
- References: <1115228950.6898.1526508125382@poczta.nazwa.pl>
* Rafal Luzynski:
> ../sysdeps/ieee754/float128/ieee754_float128.h:48:3: error: unknown type name
> ‘_Float128’
> _Float128 value;
> ^~~~~~~~~
Sorry, I didn't realize that _Float128 doesn't come from GCC in
certain versions. The patch below should fix it.
math: Reverse include order in <math-type-macros-*.h>
_Float128 is defined for certain compilers indirectly from
<libm-alias-double.h>, and <ieee754_float128.h> (included from
<math-nan-payload-float128.h>) needs this definition.
2018-05-17 Florian Weimer <fweimer@redhat.com>
* sysdeps/generic/math-type-macros-double.h: Include
<math-nan-payload-double.h> after <libm-alias-double.h>.
* sysdeps/generic/math-type-macros-float.h: Include
<math-nan-payload-float.h> after <libm-alias-float.h>.
* sysdeps/generic/math-type-macros-float128.h: Include
<math-nan-payload-float128.h> after <libm-alias-float128.h>.
* sysdeps/generic/math-type-macros-ldouble.h: Include
<math-nan-payload-ldouble.h> after <libm-alias-ldouble.h>.
diff --git a/sysdeps/generic/math-type-macros-double.h b/sysdeps/generic/math-type-macros-double.h
index 156418221d..be5d94488f 100644
--- a/sysdeps/generic/math-type-macros-double.h
+++ b/sysdeps/generic/math-type-macros-double.h
@@ -27,8 +27,8 @@
#define CFLOAT _Complex double
#define M_STRTO_NAN __strtod_nan
-#include <math-nan-payload-double.h>
#include <libm-alias-double.h>
+#include <math-nan-payload-double.h>
#ifndef declare_mgen_alias
# define declare_mgen_alias(from, to) libm_alias_double (from, to)
diff --git a/sysdeps/generic/math-type-macros-float.h b/sysdeps/generic/math-type-macros-float.h
index 7dd0b74e24..1f280950cd 100644
--- a/sysdeps/generic/math-type-macros-float.h
+++ b/sysdeps/generic/math-type-macros-float.h
@@ -30,8 +30,8 @@
the double macro constants. */
#define M_MLIT(c) c
-#include <math-nan-payload-float.h>
#include <libm-alias-float.h>
+#include <math-nan-payload-float.h>
#ifndef declare_mgen_alias
# define declare_mgen_alias(from, to) libm_alias_float (from, to)
diff --git a/sysdeps/generic/math-type-macros-float128.h b/sysdeps/generic/math-type-macros-float128.h
index 6144bc047a..c36785fbe3 100644
--- a/sysdeps/generic/math-type-macros-float128.h
+++ b/sysdeps/generic/math-type-macros-float128.h
@@ -29,8 +29,8 @@
#define M_MLIT(c) c ## f128
-#include <math-nan-payload-float128.h>
#include <libm-alias-float128.h>
+#include <math-nan-payload-float128.h>
#ifndef declare_mgen_alias
# define declare_mgen_alias(from, to) libm_alias_float128 (from, to)
diff --git a/sysdeps/generic/math-type-macros-ldouble.h b/sysdeps/generic/math-type-macros-ldouble.h
index db411998eb..300dd18f94 100644
--- a/sysdeps/generic/math-type-macros-ldouble.h
+++ b/sysdeps/generic/math-type-macros-ldouble.h
@@ -27,8 +27,8 @@
#define CFLOAT _Complex long double
#define M_STRTO_NAN __strtold_nan
-#include <math-nan-payload-ldouble.h>
#include <libm-alias-ldouble.h>
+#include <math-nan-payload-ldouble.h>
#ifndef declare_mgen_alias
# define declare_mgen_alias(from, to) libm_alias_ldouble (from, to)