From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 29 May 2011 21:30:36 +0000 (-0700)
Subject: assert-h: work around 'verify' incompatibility
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6951841b81058b0dd883fcdeb2be31d6aa8b8658;p=pspp

assert-h: work around 'verify' incompatibility

* lib/verify.h: Use @...@ directives, not ifdef.
* modules/assert-h (assert.h): Implement the directives.
---

diff --git a/ChangeLog b/ChangeLog
index 8bcf08756f..bd060c737f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	assert-h: work around 'verify' incompatibility
+	* lib/verify.h: Use @...@ directives, not ifdef.
+	* modules/assert-h (assert.h): Implement the directives.
+
 2011-05-29  Jim Meyering  <meyering@redhat.com>
 
 	trim: remove three superfluous assignments
diff --git a/lib/verify.h b/lib/verify.h
index 760486072e..c6d30a35af 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -209,7 +209,7 @@ template <int w>
 #  endif
 # endif
 
-# ifdef _GL_VERIFY_H
+/* @assert.h omit start@  */
 
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike
@@ -223,13 +223,13 @@ template <int w>
 /* Verify requirement R at compile-time, as an integer constant expression.
    Return 1.  */
 
-#  define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
 
 /* Verify requirement R at compile-time, as a declaration without a
    trailing ';'.  */
 
-#  define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
 
-# endif
+/* @assert.h omit end@  */
 
 #endif
diff --git a/modules/assert-h b/modules/assert-h
index 595fefe1e2..f7eb48244e 100644
--- a/modules/assert-h
+++ b/modules/assert-h
@@ -27,6 +27,7 @@ assert.h: assert.in.h verify.h $(top_builddir)/config.status
 	      -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
 	      < $(srcdir)/assert.in.h && \
 	  sed -e 's|_GL_VERIFY_H|_${gl_include_guard_prefix}_STATIC_ASSERT_H|g' \
+	      -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
 	      -e 's|_gl_verify|_gl_static_assert|g' \
 	      -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
 	      < $(srcdir)/verify.h; \