[MPlayer-dev-eng] [PATCH] configure: fix ws2tcpip.h header check bug

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Oct 27 00:50:27 CEST 2011


On 26 Oct 2011, at 22:49, Diego Biurrun <diego at biurrun.de> wrote:
> On Wed, Oct 26, 2011 at 07:48:45PM +0200, Ingo Brückl wrote:
>> Diego Biurrun wrote on Wed, 26 Oct 2011 19:08:40 +0200:
>> 
>>>>> I have 1.7.x and AF_INET6 is also in /usr/include/cygwin/socket.h,
>>>> 
>>>> Fine, but that's not the point.
>> 
>>> The point is that you need to develop for current Cygwin releases, not
>>> for the legacy ones.
>> 
>> No, that isn't the point either.
>> 
>> The point is that we currently check winsock2 headers even if configure has
>> determined that we don't have winsock2 on the machine. Later in the build
>> process we only include winsock2 headers if we really have winsock2.
>> 
>> For that very reason there are #if HAVE_WINSOCK2_H conditions in various
>> configure checks. Only for the headers, such a check is missing.
> 
> Assuming that the situation you describe is a problem, your patch improves
> nothing.  You still check non-winsock2 headers first even if winsock2 is
> available.  In case those checks fail, we will 99% likely have winsock2
> available, but you add some code to make sure that this is indeed the
> case.
> 
> What you need to describe is a scenario where current configure produces
> wrong results, running an extra check or two is no big deal.
> 
>> it would be nice if we could support more than just the very recent
>> release of whatever.
> 
> Supporting old Cygwin releases is not worth maintaining hacks.

Not saying that it's worth it, but you can't really call it a hack.
Checking whether a definition is available in ws2tcpip.h when we know that header will never be used is quite nonsensical.
Now bothering with that single case where it makes a difference does not really seem worth the code.
Though why don't we use winsock on cygwin anyway? Not that that would necessarily improve anything, though it makes me think that the proposed patch seems still wrong, in.h should not be checked if winsock will be used if you are pedantic...
> 


More information about the MPlayer-dev-eng mailing list