changeset 14799:8c6279c6c551

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>.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 22 May 2011 18:36:04 -0700
parents cb6280b1175e
children a5a7a62228b6
files ChangeLog lib/verify.h
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -204,7 +204,9 @@
 #  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