[PATCH] Re: IP_MULTICAST_IF et all / Winsock[2] value conflict

Brian Ford Brian.Ford@flightsafety.com
Mon Oct 3 17:25:00 GMT 2005


On Mon, 3 Oct 2005, Corinna Vinschen wrote:

> On Sep 30 18:39, Brian Ford wrote:
> > On Fri, 30 Sep 2005, Corinna Vinschen wrote:
> > > Actually we have two states, applications built before we changed the
> > > header file and applications built after we changed the header file.
> >
> > Let's just not change it ;-).
>
> No, let's change it.  Winsock2 is the way to go.  Winsock1 is just old
> stuff.  Since Cygwin is using Winsock2 when running on a 98 system or
> above, and since applications using the old/wrong Winsock1 values are
> broken right now anyway, there's no gain to keep the old values and
> force all new (and supposed to be working) applications to go through
> a translation stage.  Let the old applications suffer, not the new ones.

That's a reasonably convincing argument.  I just wish fixing this didn't
require an application recompile.  I didn't think that was the Cygwin
philosophy...<time passes>  Oh, you mean do the translation only for older
apps?  That sounds good.

> > > This is visible by an internal version number maintained by Cygwin.
> >
> > Ok, I'm not aware of how that works.
>
> vi winsup/cygwin/include/cygwin/version.h
> /CYGWIN_VERSION_CHECK

Thanks, I'll look into that.

> > Ok, here's an untested (as yet) patch:

After thinking about this over the weekend, the untested part of this
bothers me.  I've noticed that IP_MULTICAST_IF isn't working, but I've
also seen that IP_ADD_MEMBERSHIP appears to be working.  That doesn't make
any sense from the MSDN KB article, and I am checking the error status of
setsockopt.  Let me actually test this to see how I can explain the
appearant discrepency.

> Er... didn't you say somthing along the lines of "concept first, code later"?

I was trying to approach this from the trivial bug fix point of view
instead.  I was hoping if you saw the non-intrusive nature of the fix,
it might be considered before 1.5.21 :-).

> > > I want to drop Winsock1 support nevertheless.  It only complicates the
> > > code and has no real gain.
> >
> > I think I'll let you handle that one ;-).
>
> Sigh.

What's the big deal?  Isn't it just deleting a bunch of code and changing
the headers then?  I guess I have to figure out how to use the version
magic to determine when old apps need the translation...

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



More information about the Cygwin-patches mailing list