public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] headers: remove definition of ASSERT from xfs.h
@ 2015-10-15 23:46 Dave Chinner
  2015-10-16  5:35 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Chinner @ 2015-10-15 23:46 UTC (permalink / raw)
  To: xfs

From: Dave Chinner <dchinner@redhat.com>

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 <dchinner@redhat.com>
---
 include/platform_defs.h.in | 6 ++++++
 include/xfs.h              | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 30dd7a4..f4e4261 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 bc94068..7bed957 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
  */
-- 
2.5.0

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] headers: remove definition of ASSERT from xfs.h
  2015-10-15 23:46 [PATCH] headers: remove definition of ASSERT from xfs.h Dave Chinner
@ 2015-10-16  5:35 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2015-10-16  5:35 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On Fri, Oct 16, 2015 at 10:46:54AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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 <dchinner@redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-16  5:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 23:46 [PATCH] headers: remove definition of ASSERT from xfs.h Dave Chinner
2015-10-16  5:35 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox