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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:08

Robert Schiele [off-list ref] 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 <redacted>
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.

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

From: Robert Schiele <hidden>
Date: 2016-06-15 22:44:08

On Thu, Jan 24, 2008 at 01:17:14PM -0800, Junio C Hamano wrote:
Robert Schiele [off-list ref] writes:
quoted
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 <redacted>
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.
I have no strong opinion on the wording.  Sounds reasonable to me.

Robert

-- 
Robert Schiele
Dipl.-Wirtsch.informatiker	mailto:rschiele@gmail.com

"Quidquid latine dictum sit, altum sonatur."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help