changeset 14018:ac9f59901721

ceil, trunc, round: Fix gcc warnings. * lib/ceil.c (MIN): Undefine before redefining. * lib/trunc.c (MIN): Likewise. * lib/round.c (MIN): Likewise. Include <math.h> first.
author Bruno Haible <bruno@clisp.org>
date Sat, 25 Dec 2010 02:58:27 +0100
parents 1d257f14690f
children bc49ffbc1e03
files ChangeLog lib/ceil.c lib/round.c lib/trunc.c
diffstat 4 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-12-24  Bruno Haible  <bruno@clisp.org>
+
+	ceil, trunc, round: Fix gcc warnings.
+	* lib/ceil.c (MIN): Undefine before redefining.
+	* lib/trunc.c (MIN): Likewise.
+	* lib/round.c (MIN): Likewise.
+	Include <math.h> first.
+
 2010-12-24  Bruno Haible  <bruno@clisp.org>
 
 	select tests: Avoid failures on OSF/1 5.1.
--- a/lib/ceil.c
+++ b/lib/ceil.c
@@ -23,6 +23,8 @@
 
 #include <float.h>
 
+#undef MIN
+
 #ifdef USE_LONG_DOUBLE
 # define FUNC ceill
 # define DOUBLE long double
--- a/lib/round.c
+++ b/lib/round.c
@@ -20,8 +20,12 @@
 
 #include <config.h>
 
+/* Specification.  */
+#include <math.h>
+
 #include <float.h>
-#include <math.h>
+
+#undef MIN
 
 #ifdef USE_LONG_DOUBLE
 # define ROUND roundl
--- a/lib/trunc.c
+++ b/lib/trunc.c
@@ -23,6 +23,8 @@
 
 #include <float.h>
 
+#undef MIN
+
 #ifdef USE_LONG_DOUBLE
 # define FUNC truncl
 # define DOUBLE long double