about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorPaul Murphy <murphyp@linux.vnet.ibm.com>2015-11-17 12:27:39 -0600
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2015-11-19 15:52:43 -0200
commit79adcb58f6ca687c61939bbe695ffc8c54558d5f (patch)
treecf0f0822af39129e8c26545475bf76afd9f4c05a /sysdeps/ieee754
parent463ac90dab7b90ba6089c1cadd980b6185d3cceb (diff)
downloadglibc-79adcb58f6ca687c61939bbe695ffc8c54558d5f.tar.gz
glibc-79adcb58f6ca687c61939bbe695ffc8c54558d5f.tar.xz
glibc-79adcb58f6ca687c61939bbe695ffc8c54558d5f.zip
Shuffle includes in ldbl-128ibm/mpn2ldl.c
Kind of hokey, but errno.h drags in misc/sys/param.h which
defines MIN/MAX causing an error.  Include system headers
first to grab MIN/MAX definition in param.h, and define
HAVE_ALLOCA to preserve existing behavior.

	* sysdeps/ieee754/ldbl-128ibm/mpn2ldl.c: Include gmp headers
	after system headers to prevent MIN/MAX redefinition.  Define
	HAVE_ALLOCA to preserve builtin alloca usage.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c b/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c
index 90dae9325d..c7ebd7ebd8 100644
--- a/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c
@@ -15,13 +15,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include "gmp.h"
-#include "gmp-impl.h"
 #include <ieee754.h>
 #include <errno.h>
 #include <float.h>
 #include <math.h>
 
+/* Need to set this when including gmp headers after system headers.  */
+#define HAVE_ALLOCA 1
+
+#include "gmp.h"
+#include "gmp-impl.h"
+
 /* Convert a multi-precision integer of the needed number of bits (106
    for long double) and an integral power of two to a `long double' in
    IBM extended format.  */