Skip to contentSkip to conversation

headers: remove definition of ASSERT from xfs.h

PATCH In review Dave Chinner 2 participants 2 messages Oct 15, 2015 – Oct 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 headers: remove definition of ASSERT from xfs.h

From: Dave Chinner <[email protected]>

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.

---
 include/platform_defs.h.in | 6 ++++++
 include/xfs.h              | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)
include/platform_defs.h.in +6 -0
index 30dd7a4..f4e4261 100644
@@ -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__ */
include/xfs.h +0 -6
index bc94068..7bed957 100644
@@ -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
  */
Signature · 6 lines
2.5.0

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Dave Chinner

From: Dave Chinner <[email protected]>

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.

Looks good,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs