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

Re: [PATCH] Fixed compilation with Visual Studio by including poll.h

From
Jeff King <peff@peff.net>
Date
Apr 20, 2012, 23:23 UTC
Message-ID
<20120420232319.GA14109@sigill.intra.peff.net>
In-Reply-To
<xmqqty0ekr5t.fsf@junio.mtv.corp.google.com>
On Fri, Apr 20, 2012 at 02:51:58PM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> > It looks like we will prefer sys/poll.h if it exists. The official XSI
> > location is "poll.h", but I guess in practice they are equivalent on
> > most systems if you have both (certainly on Linux, poll.h just includes
> > sys/poll.h).
> 
> There actually is no preference between the two from _our_ side. It is
> up to the builder to know and define necessary make variables.

I say "prefer" only because if you set nothing, you get "sys/poll.h". So it is up to the builder to say "no, I do not have that non-standard location. Use the standard one instead". Which seems a little backwards.

Of course "standard" here is just what POSIX says; sys/poll.h may be much more standard in the real world (I don't know).

Show 7 quoted lines
> > Does your environments have a sys/poll.h that exists isn't sufficient to
> > use poll? Maybe we need to tweak git-compat-util to include both if they
> > both exist.
> 
> Both?  I guess, but I suspect that on most sane systems one would
> include the other if there are both provided (iow, just so that you can
> complile sources written both for XSI and for systems in the field).

I would think one or the other would be fine. But the fact that Sven's patch works makes me think that he has sys/poll.h, but it is not sufficient. Hopefully including "poll.h" would be enough, but it's not clear to me.

-Peff
Previous: Junio C Hamano
Message 6 of 6 in “Fixed compilation with Visual Studio by including poll.h”
  1. Fixed compilation with Visual Studio by including poll.hSven Strickroth, Apr 20, 2012
  2. Jeff KingApr 20, 2012
  3. Sven StrickrothApr 20, 2012
  4. Erik Faye-LundApr 20, 2012
  5. Junio C HamanoApr 20, 2012
  6. Jeff KingApr 20, 2012

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.