Tweak the code to make it more reusable.
authorBruno Haible <bruno@clisp.org>
Mon, 17 Oct 2005 18:06:51 +0000 (18:06 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 17 Oct 2005 18:06:51 +0000 (18:06 +0000)
m4/ChangeLog
m4/stdbool.m4

index 4e60082..4f947dc 100644 (file)
@@ -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.
index 922a002..dcb5793 100644 (file)
@@ -76,7 +76,8 @@ AC_DEFUN([AC_HEADER_STDBOOL],
          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],