From: Bruno Haible Date: Sat, 25 Dec 2010 01:58:27 +0000 (+0100) Subject: ceil, trunc, round: Fix gcc warnings. X-Git-Tag: v0.1~3469 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=995bd0764ebf4b386fca98ef660f651b25cbd8a7;p=gnulib.git ceil, trunc, round: Fix gcc warnings. * lib/ceil.c (MIN): Undefine before redefining. * lib/trunc.c (MIN): Likewise. * lib/round.c (MIN): Likewise. Include first. --- diff --git a/ChangeLog b/ChangeLog index 6124d25e1..be6b4317e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-12-24 Bruno Haible + ceil, trunc, round: Fix gcc warnings. + * lib/ceil.c (MIN): Undefine before redefining. + * lib/trunc.c (MIN): Likewise. + * lib/round.c (MIN): Likewise. + Include first. + +2010-12-24 Bruno Haible + select tests: Avoid failures on OSF/1 5.1. * tests/test-select.c (test_accept_first, test_socket_pair): Ignore failure of closing the last socket; it may fail with ECONNRESET. diff --git a/lib/ceil.c b/lib/ceil.c index 2ed16540a..5882cad83 100644 --- a/lib/ceil.c +++ b/lib/ceil.c @@ -23,6 +23,8 @@ #include +#undef MIN + #ifdef USE_LONG_DOUBLE # define FUNC ceill # define DOUBLE long double diff --git a/lib/round.c b/lib/round.c index 07ec4cdf8..df56266cd 100644 --- a/lib/round.c +++ b/lib/round.c @@ -20,9 +20,13 @@ #include -#include +/* Specification. */ #include +#include + +#undef MIN + #ifdef USE_LONG_DOUBLE # define ROUND roundl # define FLOOR floorl diff --git a/lib/trunc.c b/lib/trunc.c index 350459b2e..347d9ac21 100644 --- a/lib/trunc.c +++ b/lib/trunc.c @@ -23,6 +23,8 @@ #include +#undef MIN + #ifdef USE_LONG_DOUBLE # define FUNC truncl # define DOUBLE long double