verify: fix bug when gnulib <assert.h> is also included
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 May 2011 01:36:04 +0000 (18:36 -0700)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 17:51:53 +0000 (18:51 +0100)
* lib/verify.h (verify, verify_true): Define if _GL_VERIFY_H
is defined, not if _GL_STATIC_ASSERT_H is not defined.
Perhaps there's a better way, but this fixes the immediate problem.
Problem reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00478.html>.
(cherry picked from commit 99b313868bb6a7441f762d78252ce418f5ca7fdb)

ChangeLog
lib/verify.h

index 83fa003..fd345ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       verify: fix bug when gnulib <assert.h> is also included
+       * lib/verify.h (verify, verify_true): Define if _GL_VERIFY_H
+       is defined, not if _GL_STATIC_ASSERT_H is not defined.
+       Perhaps there's a better way, but this fixes the immediate problem.
+       Problem reported by Bruno Haible in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00478.html>.
+
 2011-05-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        clock-time: change to LGPLv2+.
index e5065ff..3294b30 100644 (file)
@@ -204,7 +204,9 @@ template <int w>
 #  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
 #   define static_assert _Static_assert /* Draft C1X requires this #define.  */
 #  endif
-# else
+# endif
+
+# ifdef _GL_VERIFY_H
 
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike