public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Tulak <jtulak@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH v2 1/4] xfsprogs: Prefix LIST_... macros to XFS_LIST_...
Date: Tue, 4 Aug 2015 04:38:42 -0400 (EDT)	[thread overview]
Message-ID: <2026707053.2526927.1438677522777.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150803221629.GT3902@dastard>



----- Original Message -----
> From: "Dave Chinner" <david@fromorbit.com>

> > /usr/include/sys/queue.h:417:9: note: previous definition is here
> > #define LIST_HEAD(name, type)                                           \
> >         ^
> > (and the same for LIST_HEAD_INIT)
> > 
> > sys/queue.h is not linked directly, but from many system libraries.
> > A quick grep on /usr/include/ shows 24 header files including the queue,
> > sys/mount.h one of them. And I didn't found a way how to avoid it.
> 
> Ok, so 4.4BSD introduced these years ago. Now it rings a bell, but I
> can't find the relevant thread I'm thinking of (google has become
> almost useless as a mailing list search engine in recent times).
> 
> I suspect that we are going to need an
> 
> #undef LIST_HEAD
> 
> somewhere in include/libxfs.h, libxfs/libxfs_priv.h and/or
> include/list.h just to ensure we don't use the system definitions
> (with a large comment explaining it).
> 

Great! Putting it in libxfs/list.h seems to be enough. This header should be
included anywhere where our lists are used, so I think there should be no
risk of using the system definition anymore. I'm making an updated patch.

Thanks for pointing on #undef. I'm sure I must have heard of it before, 
but as I never used it... :-)

Cheers,
Jan

-- 
Jan Tulak
jtulak@redhat.com

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

  reply	other threads:[~2015-08-04  8:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 12:56 [PATCH v2 0/4] xfsprogs: Partial OS X support Jan Tulak
2015-07-20 12:56 ` [PATCH v2 1/4] xfsprogs: Prefix LIST_... macros to XFS_LIST_ Jan Tulak
2015-08-02 23:42   ` Dave Chinner
2015-08-03  9:34     ` Jan Tulak
2015-08-03 22:16       ` Dave Chinner
2015-08-04  8:38         ` Jan Tulak [this message]
2015-07-20 12:56 ` [PATCH v2 2/4] xfsprogs: Don't Make .po files with gettext disabled Jan Tulak
2015-07-26 16:28   ` Christoph Hellwig
2015-07-20 12:56 ` [PATCH v2 3/4] xfsprogs: Use glibtoolize on osx Jan Tulak
2015-07-26 16:29   ` Christoph Hellwig
2015-07-20 12:56 ` [PATCH v2 4/4] xfsprogs: OS X partial support Jan Tulak
2015-07-26 16:34   ` Christoph Hellwig
2015-07-27 16:45     ` Jan Tulak

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=2026707053.2526927.1438677522777.JavaMail.zimbra@redhat.com \
    --to=jtulak@redhat.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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