]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Include sys/param.h in stdlib/gmp-impl.h instead of redefining MAX/MIN
authorGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Fri, 26 May 2017 22:29:20 +0000 (19:29 -0300)
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Thu, 1 Jun 2017 23:44:22 +0000 (20:44 -0300)
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
stdlib/gmp-impl.h

index 961c549653d9f22f5d3641427ba54ec0d0ec7a04..69c13509c6b2600af67eb10da1598e9b2fc0c78d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-01  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
+
+       * stdlib/gmp-impl.h: Include sys/param.h instead of redefining the
+       macros MAX and MIN.
+
 2017-06-01  Joseph Myers  <joseph@codesourcery.com>
 
        * conform/data/signal.h-data (sa_sigaction): Do not expect for
index a6594ffe4bfaaf5dbed2d379066157f21dc8de8c..89693c4f0b253c244296d96f0de1fcd4617436ab 100644 (file)
@@ -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 <sys/param.h>
 
 /* Field access macros.  */
 #define SIZ(x) ((x)->_mp_size)