git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] list: avoid incompatibility with *BSD sys/queue.h

From
EWEric Wong <e@80x24.org>
Date
Jul 17, 2016, 23:07 UTC
Message-ID
<20160717230718.GA8569@starla>
In-Reply-To
<CAPig+cRvhbKwr=QJAyp=sYLLGDx-B2EHovHpn8Z1701stQMi1g@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 17 quoted lines
> 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.

Previous: Eric SunshineNext: Lars Schneider
Message 20 of 21 in “What's cooking in git.git (Jul 2016, #05; Wed, 13)”
  1. Junio C HamanoJul 13, 2016
  2. Stefan BellerJul 13, 2016
  3. Junio C HamanoJul 13, 2016
  4. Stefan BellerJul 13, 2016
  5. Junio C HamanoJul 13, 2016
  6. Junio C HamanoJul 13, 2016
  7. Jeff KingJul 13, 2016
  8. Duy NguyenJul 13, 2016
  9. Junio C HamanoJul 13, 2016
  10. Johannes SchindelinJul 14, 2016
  11. Johannes SchindelinJul 14, 2016
  12. Junio C HamanoJul 14, 2016
  13. Johannes SchindelinJul 14, 2016
  14. Junio C HamanoJul 14, 2016
  15. Lars SchneiderJul 16, 2016
  16. Eric WongJul 16, 2016
  17. Lars SchneiderJul 16, 2016
  18. list: avoid incompatibility with *BSD sys/queue.hEric Wong, Jul 17, 2016
  19. Eric SunshineJul 17, 2016
  20. Eric WongJul 17, 2016
  21. Lars SchneiderJul 18, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.