changeset 6390:8e5f43169a9f

Tweak the code to make it more reusable.
author Bruno Haible <bruno@clisp.org>
date Mon, 17 Oct 2005 18:06:51 +0000
parents c1766dccfd4f
children ee5fed40200f
files m4/ChangeLog m4/stdbool.m4
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-17  Bruno Haible  <bruno@clisp.org>
+
+	* stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so that
+	it can also be used in a test.
+
 2005-10-11  Simon Josefsson  <jas@extundo.com>
 
 	* md5.m4: Remove call to uint32_t.m4.
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -76,7 +76,8 @@
 	  char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
 	],
 	[
-	  return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l
+	  /* Refer to every declared value, to avoid compiler optimizations.  */
+	  return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
 		  + !m + !n + !o + !p);
 	],
 	[ac_cv_header_stdbool_h=yes],