public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH] headers: remove definition of ASSERT from xfs.h
Date: Fri, 16 Oct 2015 10:46:54 +1100	[thread overview]
Message-ID: <1444952814-13063-1-git-send-email-david@fromorbit.com> (raw)

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

             reply	other threads:[~2015-10-15 23:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 23:46 Dave Chinner [this message]
2015-10-16  5:35 ` [PATCH] headers: remove definition of ASSERT from xfs.h Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444952814-13063-1-git-send-email-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox