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)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 May 2011 01:36:04 +0000 (18:36 -0700)
* 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>.

ChangeLog
lib/verify.h

index b35733c..9509b2c 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-22  Bruno Haible  <bruno@clisp.org>
 
        xgetcwd: Simplify autoconf macro.
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