assert-h: Allow multiple gnulib generated replacements to coexist.
authorBruno Haible <bruno@clisp.org>
Sun, 29 May 2011 13:38:41 +0000 (15:38 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 29 May 2011 13:38:41 +0000 (15:38 +0200)
* lib/verify.h (struct _gl_verify_type): Avoid identical redefinition.

ChangeLog
lib/verify.h

index 77274bb..1f61eff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-05-29  Bruno Haible  <bruno@clisp.org>
 
+       assert-h: Allow multiple gnulib generated replacements to coexist.
+       * lib/verify.h (struct _gl_verify_type): Avoid identical redefinition.
+
+2011-05-29  Bruno Haible  <bruno@clisp.org>
+
        argp: Allow coexistence with strerror_r-posix module.
        * lib/argp-help.c (__argp_failure): If strerror_r is defined as a macro
        (either to __xpg_strerror_r by glibc's <string.h> or to rpl_strerror_r
index 3294b30..7604860 100644 (file)
     (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
 
 # ifdef __cplusplus
+#  if !GNULIB_defined_struct__gl_verify_type
 template <int w>
   struct _gl_verify_type {
     unsigned int _gl_verify_error_if_negative: w;
   };
+#   define GNULIB_defined_struct__gl_verify_type 1
+#  endif
 #  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
     _gl_verify_type<(R) ? 1 : -1>
 # elif defined _GL_HAVE__STATIC_ASSERT