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

Re: [PATCH] some systems don't have (and need) sys/select.h

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 24, 2008, 21:17 UTC
Message-ID
<7vk5ly9b51.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080124183446.GJ30676@schiele.dyndns.org>
Robert Schiele <rschiele@gmail.com> writes:
> The select stuff is already in sys/time.h on on some systems like HP-UX
> thus we should not include sys/select.h in that case.
>
> Signed-off-by: Robert Schiele <rschiele@gmail.com>

The patch looks good. I'd rather try to be a bit more helpful to people who want to port git to their system that is not HP-UX, though.

How about wording it like this?
Subject: pre-POSIX.1-2001 systems do not have <sys/select.h>

POSIX.1-2001 has declaration of select(2) in <sys/select.h>, but in previous version of SUS, it is declared in <sys/time.h>, which is already included in git-compat-util.h.

This introduces NO_SYS_SELECT_H macro in the Makefile to be set on older systems, to skip inclusion of <sys/select.h> that does not exist on them.

We could check _POSIX_VERSION with 200112L and do this automatically, but earlier it was reported that the approach does not work well on some vintage of HP-UX. Other systems may get _POSIX_VERSION itself wrong. At least for now, this manual configuration is safer.

Previous: Johannes SchindelinNext: Robert Schiele
Message 3 of 9 in “some systems don't have (and need) sys/select.h”
  1. some systems don't have (and need) sys/select.hRobert Schiele, Jan 24, 2008
  2. Johannes SchindelinJan 24, 2008
  3. Junio C HamanoJan 24, 2008
  4. Robert SchieleJan 24, 2008
  5. autoconf: Add test for sys/select.h header fileJakub Narebski, Jan 25, 2008
  6. Johannes SchindelinJan 25, 2008
  7. Robert SchieleJan 25, 2008
  8. Junio C HamanoJan 26, 2008
  9. Robert SchieleJan 26, 2008

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.