From: Dave Chinner Date: Wed, 28 Oct 2015 01:01:48 +0000 (+1100) Subject: headers: remove definition of ASSERT from xfs.h X-Git-Tag: v4.3.0-rc2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cfd2d5b5df6164daf03becdef236444c0bfe74a;p=thirdparty%2Fxfsprogs-dev.git headers: remove definition of ASSERT from xfs.h If we define ASSERT() in the installed xfs.h header file, programs including this header file will have their local definitions of ASSERT screwed up. This is something internal to the xfsprogs build, so move it to platform_defs.h.in where it will no longer be public. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig --- diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index 30dd7a473..f4e4261aa 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -83,4 +83,10 @@ typedef unsigned short umode_t; #define NBBY 8 #endif +#ifdef DEBUG +# define ASSERT(EX) assert(EX) +#else +# define ASSERT(EX) ((void) 0) +#endif + #endif /* __XFS_PLATFORM_DEFS_H__ */ diff --git a/include/xfs.h b/include/xfs.h index bc940685e..7bed95733 100644 --- a/include/xfs.h +++ b/include/xfs.h @@ -47,12 +47,6 @@ # error unknown platform... have fun porting! #endif -#ifdef DEBUG -# define ASSERT(EX) assert(EX) -#else -# define ASSERT(EX) ((void) 0) -#endif - /* * sparse kernel source annotations */