On 3/19/2016 10:44 PM, Paul Eggert wrote:
Ken Brown wrote:
Cygwin is changing its headers as of the next release so that sys/types.h
includes sys/select.h....
Can sys_select be changed so that it doesn't try to include other
headers before
it has finished including sys/types.h? Or is there some other way to
solve this
problem?
Probably the latter. Why is Cygwin changing its headers? What is it
changing? This may help us to provide a special case in Gnulib to solve
the problem. For example, we might be able to add Cygwin to the
existing mess of code near the start of lib/sys_select.in.h that does
something special for __osf__ and/or for __sun.
Eric can probably explain this better than I can, but I'll give it a
try. Newlib, which provides Cygwin's libc, has just had a complete
overhaul of its feature test macros, with the goal of increasing
compatibility with Glibc and/or BSD. The relevant change to sys/types.h
is simply
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -87,5 +87,7 @@
# if __BSD_VISIBLE
+#include <sys/select.h>
+
# define physadr physadr_t
# define quad quad_t
I gather that __BSD_VISIBLE is similar to Glibc's __USE_MISC, which
Glibc uses to guard the inclusion of sys/select.h.
Ken