From 226faf4e11ab2266db613304089423550f210bac Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Thu, 3 Mar 2016 17:05:12 +0100 Subject: [PATCH 1/3] Avoid redefining __pure2 in types-compat --- src/types-compat.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/types-compat.h b/src/types-compat.h index 665c1e31..b20b5aea 100644 --- a/src/types-compat.h +++ b/src/types-compat.h @@ -3,17 +3,6 @@ #include #include -#include - -#ifdef __GLIBC__ -/* Not sure what to do about __pure2 on linux */ -#define __pure2 -#endif - -#ifdef _WIN32 -/* Not sure what to do about __pure2 on windows */ -#define __pure2 -#endif typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; From 0df58e7ae399282e7841dc40b8b3215bc8e6c946 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Thu, 3 Mar 2016 17:28:06 +0100 Subject: [PATCH 2/3] Use quotes instead of <> with #include for private headers --- i387/fenv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i387/fenv.c b/i387/fenv.c index b6b26f71..b0a8744b 100644 --- a/i387/fenv.c +++ b/i387/fenv.c @@ -26,10 +26,10 @@ * $FreeBSD: src/lib/msun/i387/fenv.c,v 1.8 2011/10/21 06:25:31 das Exp $ */ -#include -#include -#include -#include +#include "cdefs-compat.h" +#include "types-compat.h" +#include "math_private.h" +#include "i387/bsd_npx.h" #define __fenv_static #include From e836b30cc783fff7add05a7823d0c877ca64e50d Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Tue, 8 Mar 2016 10:34:20 +0100 Subject: [PATCH 3/3] Avoid defining __pure2 if already defined This gets rid of a warning on Mac OS X due to the fact that sys/cdefs.h defines it already. --- src/bsd_cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bsd_cdefs.h b/src/bsd_cdefs.h index 1ef71ca4..b0ceee3e 100644 --- a/src/bsd_cdefs.h +++ b/src/bsd_cdefs.h @@ -93,7 +93,7 @@ * for a given compiler, let the compile fail if it is told to use * a feature that we cannot live without. */ -#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) +#if !defined(__pure2) && (__GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER)) #define __pure2 __attribute__((__const__)) #endif