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

RE: [PATCH v2] Support non-WIN32 system lacking poll() while keeping the WIN32 part intact

From
Joachim Schmitz <jojo@schmitz-digital.de>
Date
Aug 24, 2012, 18:58 UTC
Message-ID
<005401cd822a$67687a30$36396e90$@schmitz-digital.de>
In-Reply-To
<7vsjbc1dg1.fsf@alter.siamese.dyndns.org>
Show 30 quoted lines
> From: Junio C Hamano [mailto:gitster@pobox.com]
> Sent: Friday, August 24, 2012 6:07 PM
> To: Joachim Schmitz
> Cc: git@vger.kernel.org; Erik Faye-Lund
> Subject: Re: [PATCH v2] Support non-WIN32 system lacking poll() while keeping the WIN32 part intact
> 
> "Joachim Schmitz" <jojo@schmitz-digital.de> writes:
> 
> > There is a downside with this: In order to make use of it, in Makefile it
> > adds "-Icompat/win32" to COMPAR_CFLAGS. This results in
> > compat/win32/dirent.h to be found, rather than /usr/include/dirent.h.
> > This should be fine for WIN32, but for everybody else may not.
> > For HP NonStop in particular it results in a warning:
> >
> >         };
> >          ^
> > "... /compat/win32/dirent.h", line 17: warning(133): expected an identifier
> >
> > And this is because there it uses an unnamed union, which is a GCC extension
> > (just like unnamed struct), but not part of C89/C99/POSIX.
> >
> > One possible solution might be to move compat/win32/poll.[ch] to compat/.
> 
> I think that is the most sensible way to go, because poll.[ch]
> 
>  (1) has proven itself to be useful outside the context of win32, and
>  (2) the code is coming from gnulib anyway.
> 
> I thought I already suggested going that route in my previous
> review, but perhaps I forgot to do so.

No, I believe you did, but I had forgotten about it. Could/should that be a 2nd patch? Or a v3 of this one?

Different, but related question: would poll.[ch] be allowed to #include "git-compat-util.h"?
Bye, Jojo
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “RE: [PATCH v2] Support non-WIN32 system lacking poll() while keeping the WIN32 part intact”
  1. Joachim SchmitzAug 24, 2012
  2. Junio C HamanoAug 24, 2012
  3. Joachim SchmitzAug 24, 2012
  4. Junio C HamanoAug 24, 2012
  5. Joachim SchmitzSep 4, 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.