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 77274bb51c..1f61effe6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/lib/verify.h b/lib/verify.h index 3294b30350..760486072e 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.30.2