[PATCH] FreeBSD compatibility for <sys/select.h>
Nick Withers
nick.withers@anu.edu.au
Fri Dec 18 10:09:00 GMT 2015
On Fri, 2015-12-18 at 10:02 +0100, Corinna Vinschen wrote:
> On Dec 18 08:02, Sebastian Huber wrote:
> > It seems to work with this change. I guess this is due to the
> > include of
> > <sys/select.h> in <sys/time.h>. Is this all right?
>
> Including sys/select.h from sys/time.h is perfectly fine. We already
> did
> that before, albeit only on Cygwin so far. GLibc does it as well,
> even
> unconditionally (no guard along our #if __BSD_VISIBLE). Only
> sys/types.h
> should not (must not per POSIX) expose the sys/select.h namespace.
POSIX 2004 / Issue 6 specifically allows it:
http://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/time.h.html
"Inclusion of the <sys/time.h> header may make visible all symbols from
the <sys/select.h> header"
--
Nick Withers
Embedded Systems Programmer
Department of Nuclear Physics, Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
More information about the Newlib
mailing list