summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-07-11 03:52:48 +0200
committerBruno Haible <bruno@clisp.org>2017-07-11 03:52:48 +0200
commitf12a7bbb4acaaa72f48e452e04da2a4dd749a664 (patch)
treecee9b4cbce3af0160aa590836da05a170bdaa984
parent7f1ef184ab3d3ccd96e512feafdf6b120eb88db1 (diff)
downloadgnulib-f12a7bbb4acaaa72f48e452e04da2a4dd749a664.tar.gz
round, roundf: Avoid compiler warning in configure test.
* m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit(). * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--m4/round.m44
-rw-r--r--m4/roundf.m44
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c05a5e481b..4fcc254b4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2017-07-10 Bruno Haible <bruno@clisp.org>
+ round, roundf: Avoid compiler warning in configure test.
+ * m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit().
+ * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
+
+2017-07-10 Bruno Haible <bruno@clisp.org>
+
getlogin tests: Avoid #ifdefs when sharing code between modules.
* modules/getlogin_r-tests (Files): Add tests/test-getlogin.h.
* modules/getlogin-tests (Files): Likewise. Remove
diff --git a/m4/round.m4 b/m4/round.m4
index 45b7df4591..ede34b29d6 100644
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -1,4 +1,4 @@
-# round.m4 serial 16
+# round.m4 serial 17
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -57,7 +57,7 @@ int main()
* (double) (1U << ((DBL_MANT_DIG + 3) / 5))
* (double) (1U << ((DBL_MANT_DIG + 4) / 5));
volatile double x = 0.5 - 0.5 / TWO_MANT_DIG;
- exit (x < 0.5 && round (x) != 0.0);
+ return (x < 0.5 && round (x) != 0.0);
}]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
[case "$host_os" in
netbsd* | aix*) gl_cv_func_round_works="guessing no";;
diff --git a/m4/roundf.m4 b/m4/roundf.m4
index 543ee0f934..f623b554a7 100644
--- a/m4/roundf.m4
+++ b/m4/roundf.m4
@@ -1,4 +1,4 @@
-# roundf.m4 serial 17
+# roundf.m4 serial 18
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -54,7 +54,7 @@ int main()
* (float) (1U << ((FLT_MANT_DIG + 1) / 3))
* (float) (1U << ((FLT_MANT_DIG + 2) / 3));
volatile float x = 0.5f - 0.5f / TWO_MANT_DIG;
- exit (x < 0.5f && roundf (x) != 0.0f);
+ return (x < 0.5f && roundf (x) != 0.0f);
}]])], [gl_cv_func_roundf_works=yes], [gl_cv_func_roundf_works=no],
[case "$host_os" in
mingw*) gl_cv_func_roundf_works="guessing no";;