Longstanding __USE_W32_SOCKETS hiccup.

Larry Hall (Cygwin Developers) lhall@cygwin.com
Fri Aug 7 19:11:00 GMT 2009


On 08/07/2009 02:50 PM, Dave Korn wrote:
> Corinna Vinschen wrote:
>> On Aug  7 18:08, Dave Korn wrote:
>>> Christopher Faylor wrote:
>>>
>>>> I haven't been paying close attention here but why are we bothering to
>>>> accommodate use of winsock2.h and time.h.  This is really only for
>>>> Cygwin itself right?
>>>    Nope.
>>>
>>>> Otherwise, I don't think we should worry about people trying to mix
>>>> winsock.h in true Cygwin programs.
>>>    It seems to have worked well enough for GNAT in gcc-4.3.2 and earlier, but GCC
>>> HEAD has undergone some sort of refactoring that means we now get a duplicate
>>> definition of timeval during compilation of libada.  This is aimed at fixing
>>> that problem.
>>
>> Why is libada including winsock2.h when being build for Cygwin?  That's
>> a bug.
>
>    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.

Perhaps I'm out of place but I'm wondering if the question here isn't
"what does the ada compiler do?" but rather "do we want to permit silent,
uninformed use of winsock?"  If the answer to the latter question is no,
then it seems like the ada compiler should be more explicit about what it's
doing and no change should be made in Cygwin.  If the answer is the latter,
then one of the proposed solutions makes sense.  Taking this one step
further, Dave, is there a reason ada couldn't be taught to make its design
intent explicit?

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 429-6305 - FAX
Holliston, MA 01746



More information about the Cygwin-developers mailing list