delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/30/11:11:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 30 Sep 2005 10:07:29 -0500
From: Brian Ford <Brian DOT Ford AT flightsafety DOT com>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: IP_MULTICAST_IF et. all / Winsock[2] value conflict
In-Reply-To: <20050930081701.GB27423@calimero.vinschen.de>
Message-ID: <Pine.CYG.4.58.0509300947210.2244@PC1163-8460-XP.flightsafety.com>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0509291103421 DOT 2244 AT PC1163-8460-XP DOT flightsafety DOT com> <20050929165053 DOT GU12256 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0509291152490 DOT 2244 AT PC1163-8460-XP DOT flightsafety DOT com> <20050930081701 DOT GB27423 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes

On Fri, 30 Sep 2005, Corinna Vinschen wrote:
> On Sep 29 12:04, Brian Ford wrote:
> > On Thu, 29 Sep 2005, Corinna Vinschen wrote:
> > > There's no easy fix right now.  We have to drop all traces of Winsock1
> > > in Cygwin and change the headers accordingly.
> >
> > Can't we just translate these based on a flag indicating what version we
> > dynamically loaded?
>
> Yes, in theory we can.  But that's hell.  The definitions in socket.h
> wouldn't be static values anymore, they would have to be translated
> into function calls to retrieve the right value at runtime.  That's
> bound to break building applications which rely on getting constant
> values.

That wasn't what I was suggesting.

We can simply translate the current constant Winsock 1 values to Winsock 2
ones when necessary in cygwin_[set|get]sockopt.  There are only 8 values
that need changing, I think.

Is winsock2_active the correct flag to indicate this case?

> Really, dropping Winsock1 entirely is the way to go.  Winsock2 is
> available since Win98 and even for Win95, there's a Winsock2 available
> for free on some Microsoft web page (should be in the Cygwin mailing
> list archives somewhere).

If this is really the consensus, then ok.  But, how do we maintain
backward compatibility for previously compiled apps then?  Isn't that
still a goal?

> So that's the next step to do in the networking code and, Brian,
> while we're at it, some team work wouldn't hurt here.  I recall
> that you have a copyright assignment in place.
> http://cygwin.com/acronyms/#PTC
> http://cygwin.com/acronyms/#SHTDI

I don't mind doing it once I have enough of an understanding about how it
should be done.  That was my original road block.  I don't like wasting
time on approaches that will never be accepted on principal.  I like
the concept first, code later approach.

BTW, did you understand what the following statement from
http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 means?

"A program that includes Ws2tcpip.h may link with either Ws2_32.lib or
Wsock32.lib. Note that Ws2tcpip.h must be explicitly included after
Winsock2.h in order to use socket options at this level."

I'm still confused on this one and it seems like an understanding of how
that is supposed to work might help us here.

Let's decide on a few more details and I'll have a go at a patch.  Thanks
for your help.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019