From: "Hans-Bernhard Bröker" <HBBroeker@t-online.de>
To: cygwin@cygwin.com
Subject: Re: GCC-6.4 sys/select.h build failures with std=c++14
Date: Tue, 26 Sep 2017 19:33:00 -0000 [thread overview]
Message-ID: <14bf630c-34b2-0065-589d-66176cc9d445@t-online.de> (raw)
In-Reply-To: <5cacbf9c-26d0-da8b-0aa8-ad5ec50bea2d@gmail.com>
Am 26.09.2017 um 07:32 schrieb Marco Atzeri:
> "The <sys/select.h> header shall define the fd_set type as a structure."
>
> so if they are using it, they should have a proper include
The complete story is a bit more complicated than that, though.
The curl maintainers almost fixed this at their end, but then Cygwin
reverted part of a change that had "suddenly" triggered their broken
code to actually fail before they did. Before then, Cygwin's fd_set was
actually in <sys/types.h>, which was then #included by <sys/select.h>.
The change was to define them it <sys/select.h> where it belongs
But then the second change was made (commit
ee97c4b22491b205fd3b7697e03c909e02b652d3), which reintroduced
# if __BSD_VISIBLE
#include <sys/select.h>
in <sys/types.h>. This actually re-introduced a part of the original
POSIX violation in Cygwin: #including <sys/types.h> will, again, drag in
<sys/select.h> even though that was not asked for. Apparently this
violation is sufficiently wide-spread that there's quite some code out
there that relies on it. Curl is in this group.
All this seems to have left the Curl people under the impression that
there was nothing wrong with their code, but that rather Cygwin was
broken, and for a relatively short time only, too (2015-12-17 to
2016-03-18). The fragment in question is positively hideous:
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
#include <sys/select.h>
#endif
Now people complain about autoconf being clunky, but it's easily an
order of magnitude better than _that_ pile of nonsense --- particularly
given the fact that they actually use autoconf to build their code.
They just don't do so in their public, installable header file.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
prev parent reply other threads:[~2017-09-26 19:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 1:41 Ian Fette
2017-09-26 4:49 ` Brian Inglis
2017-09-26 5:33 ` Marco Atzeri
2017-09-26 19:33 ` Hans-Bernhard Bröker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14bf630c-34b2-0065-589d-66176cc9d445@t-online.de \
--to=hbbroeker@t-online.de \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).