Longstanding __USE_W32_SOCKETS hiccup.
Fri Aug 7 19:38:00 GMT 2009
Christopher Faylor wrote:
> On Fri, Aug 07, 2009 at 07:50:51PM +0100, Dave Korn wrote:
>> No, it's by design. For some reason, presumably historical, the ada compiler
>> is a hybrid of cyg and ming. It works well enough using winsock sockets; the
>> only bug is that it doesn't use __USE_W32_SOCKETS while doing so. Previously it
>> got away with it by luck, now it doesn't.
> It's still a bug.
I may have misunderstood the intent of __USE_W32_SOCKETS; I thought it was
available for the use of user applications, but the conversation so far seems to
be implying it's reserved for internal use during building the Cygwin DLL
itself? (Also, the language runtimes are in a somewhat special place w.r.t. the
execution environment as a whole, they are not just any old end-user
application, and it's in general to be expected that the runtime, kernel and
toolchain all have to co-operate with each other at least a bit.)
> Cygwin's purpose is to hide Windows-isms. If some package is trying to
> play fast and loose by mixing the POSIX with the Windows then they have
> to be willing to accommodate as we tighten things up.
Yes, or even better, to transition to using Cygwin's POSIX mechanisms, but
that's not something that can take place in what little remains of GCC 4.5.0
stage 1, it would take months of work, and preferably by someone who knows Ada.
I'd just like to fix what was already there, not reimplement the whole thing
from the ground up.
> You can, after all, mix msvcrt and cygwin if you want too. That doesn't
> mean we have to stand on our heads to support it.
I'm not asking for anything that qualifies as head-standing. The options that
I can think of are:
1- This trivial patch to sys/types.h (plus a couple of patches to GCC to
#define __USE_W32_SOCKETS where needed).
2- Rewrite Ada runtime on cygwin target from ground up to remove ming-isms.
3- Bring back fixincludes on cygwin target after years of obsolescence and get
the compiler to make this change to sys/types.h for its own private copy.
4- Leave a big chunk of the compiler busted upstream forever, getting more and
more bitrotten until it's beyond repair.
#2 is months of work. #3 probably adds several weeks and misses the stage1
deadline, and drags in a lot of overhead for just one single use. #4 would be a
great shame and I'd have to drop Ada in future (post-4.3 series) versions of the
distro compiler. #1 works fine for the MinGW project and should work just as
fine for us.
More information about the Cygwin-developers