summaryrefslogtreecommitdiff
path: root/lib/round.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-10-10 01:07:15 +0200
committerBruno Haible <bruno@clisp.org>2011-10-10 01:07:15 +0200
commita25368f150046137109aa8cf58cb85dc6bc234b5 (patch)
treecf3ec92bb311aadec2a61310e70a04855ab52136 /lib/round.c
parent3d57d93ced65ddec292e320e35fb648dff34cd83 (diff)
downloadgnulib-a25368f150046137109aa8cf58cb85dc6bc234b5.tar.gz
roundl: Simplify for platforms where 'long double' == 'double'.
* lib/roundl.c: Include <config.h>. (roundl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function. * lib/round.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second time. * m4/roundl.m4 (gl_FUNC_ROUNDL): Require gl_LONG_DOUBLE_VS_DOUBLE. Determine ROUNDL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE. * modules/roundl (Depends-on): Add round. Update conditions.
Diffstat (limited to 'lib/round.c')
-rw-r--r--lib/round.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/round.c b/lib/round.c
index a1dbead444..a6c778e7a3 100644
--- a/lib/round.c
+++ b/lib/round.c
@@ -18,7 +18,9 @@
/* Written by Ben Pfaff <blp@gnu.org>, 2007.
Based heavily on code by Bruno Haible. */
-#include <config.h>
+#if ! defined USE_LONG_DOUBLE
+# include <config.h>
+#endif
/* Specification. */
#include <math.h>