All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Lars Schneider <larsxschneider@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH] list: avoid incompatibility with *BSD sys/queue.h
Date: Sun, 17 Jul 2016 23:07:18 +0000	[thread overview]
Message-ID: <20160717230718.GA8569@starla> (raw)
In-Reply-To: <CAPig+cRvhbKwr=QJAyp=sYLLGDx-B2EHovHpn8Z1701stQMi1g@mail.gmail.com>

Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Sat, Jul 16, 2016 at 8:25 PM, Eric Wong <e@80x24.org> wrote:
> > Eric Wong <e@80x24.org> wrote:
> >> I also wonder where we use sys/queue.h, since I use
> >> LIST_HEAD from ccan/list/list.h in a different project
> >> without conflicts...
> >
> > Still wondering... Checking sys/mman.h in an old FreeBSD source
> > tree I had lying around reveals "#include <sys/queue.h>" is
> > guarded by "#if defined(_KERNEL)", so it mman.h wouldn't pull
> > it in for userspace builds...
> 
> It's pulled in like this:
> 
>     git-compat-util.h ->
>     sys/sysctl.h ->
>     sys/ucred.h ->
>     sys/queue.h

Ah, thanks (and I've been sidetracked into using FreeBSD again :>)

> Very reminiscent of [1].
> 
> [1]: http://git.661346.n2.nabble.com/PATCH-ewah-bitmap-silence-warning-about-MASK-macro-redefinition-td7632287.html

Alright.  In this case, I think "LIST_HEAD" is sufficiently
descriptive compared to more-generically named "MASK" or "BLOCK"
that it's harmless to "#undef LIST_HEAD" here without worrying
about conflicts or breaking outside code.

  reply	other threads:[~2016-07-17 23:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 16:56 What's cooking in git.git (Jul 2016, #05; Wed, 13) Junio C Hamano
2016-07-13 17:27 ` Stefan Beller
2016-07-13 17:32   ` Junio C Hamano
2016-07-13 17:52     ` Stefan Beller
2016-07-13 17:55       ` Junio C Hamano
2016-07-13 22:41       ` Junio C Hamano
2016-07-13 22:42         ` Jeff King
2016-07-13 17:40 ` Duy Nguyen
2016-07-13 17:46   ` Junio C Hamano
2016-07-14 12:59 ` Johannes Schindelin
2016-07-14 13:15 ` Johannes Schindelin
2016-07-14 15:45   ` Junio C Hamano
2016-07-14 13:46 ` Johannes Schindelin
2016-07-14 15:48   ` Junio C Hamano
2016-07-16 20:54 ` Lars Schneider
2016-07-16 21:04   ` Eric Wong
2016-07-16 22:04     ` Lars Schneider
2016-07-17  0:25     ` [PATCH] list: avoid incompatibility with *BSD sys/queue.h Eric Wong
2016-07-17  5:58       ` Eric Sunshine
2016-07-17 23:07         ` Eric Wong [this message]
2016-07-18 16:08       ` Lars Schneider

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=20160717230718.GA8569@starla \
    --to=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=larsxschneider@gmail.com \
    --cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.