From 09103e40252454e906a0b8543a142fc96b4c17c1 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Fri, 26 May 2017 19:29:20 -0300 Subject: [PATCH] Include sys/param.h in stdlib/gmp-impl.h instead of redefining MAX/MIN In stdlib/gmp-impl.h, the macros MAX and MIN are defined exactly the same as in sys/param.h. This patch removes the redefinition and makes gmp-impl.h include sys/param.h instead. Tested for powerpc64le and s390x. * stdlib/gmp-impl.h: Include sys/param.h instead of redefining the macros MAX and MIN. --- ChangeLog | 5 +++++ stdlib/gmp-impl.h | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 961c549653..69c13509c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-06-01 Gabriel F. T. Gomes + + * stdlib/gmp-impl.h: Include sys/param.h instead of redefining the + macros MAX and MIN. + 2017-06-01 Joseph Myers * conform/data/signal.h-data (sa_sigaction): Do not expect for diff --git a/stdlib/gmp-impl.h b/stdlib/gmp-impl.h index a6594ffe4b..89693c4f0b 100644 --- a/stdlib/gmp-impl.h +++ b/stdlib/gmp-impl.h @@ -64,12 +64,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see #define inline /* Empty */ #endif -#ifndef MIN -#define MIN(l,o) ((l) < (o) ? (l) : (o)) -#endif -#ifndef MAX -#define MAX(h,i) ((h) > (i) ? (h) : (i)) -#endif +/* Get MAX/MIN macros. */ +#include /* Field access macros. */ #define SIZ(x) ((x)->_mp_size)