From 606b7ac5defd3ee289dee9cf0f5d23fb0ccd3887 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 29 May 2011 15:38:41 +0200 Subject: [PATCH] assert-h: Allow multiple gnulib generated replacements to coexist. * lib/verify.h (struct _gl_verify_type): Avoid identical redefinition. --- ChangeLog | 5 +++++ lib/verify.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 77274bb51..1f61effe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-05-29 Bruno Haible + assert-h: Allow multiple gnulib generated replacements to coexist. + * lib/verify.h (struct _gl_verify_type): Avoid identical redefinition. + +2011-05-29 Bruno Haible + 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 or to rpl_strerror_r diff --git a/lib/verify.h b/lib/verify.h index 3294b3035..760486072 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -164,10 +164,13 @@ (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) # ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type template 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 -- 2.11.0