[FFmpeg-devel] [PATCH] Enable proper IPv6 functions on windows

Måns Rullgård mans
Fri Jan 15 22:40:52 CET 2010


Ramiro Polla <ramiro.polla at gmail.com> writes:

> On Fri, Jan 15, 2010 at 7:23 PM, Martin Storsj? <martin at martin.st> wrote:
>> On Fri, 15 Jan 2010, Ramiro Polla wrote:
>>> > so instead of just killing win9x, now you've killed win2k too?
>>> >
>>> > cant we have both?
>>> >
>>> > if WINNT=0x0501 then use xp stuff
>>> > else if WINNT=0x0500 use win9x/2k stuff
>>> >
>>> > do the win2k users outnumber the ipv6 users?
>>>
>>> From what I understand win2k will still work with --disable-network
>>> (like in the documentation).
>>>
>>> Martin, would it be possible and not too ugly to #ifdef out the code
>>> that needs winxp so the current network support would still be
>>> possible with some configure option?
>>
>> Well, as the next step, I intended to send a patch adding
>>
>> ? ?check_func_headers ws2tcpip.h getaddrinfo $network_extralibs
>>
>> to the winsock part of the network section in configure. The point being
>> that if _WIN32_WINNT=0x0501 is set, the check will succeed and we will
>> link to the >= winxp getaddrinfo function, otherwise we'll set
>> HAVE_GETADDRINFO to 0 and use our fallback wrapper instead.
>>
>> So if we want pre-XP compatibility configurable, we would only add
>> _WIN32_WINNT=0x0501 in that particular case - as in your initial win9x
>> patch. So, your initial approach, but perhaps renaming the mingw32-win9x
>> target os name into mingw32-win2k or something similar (mingw32-prexp?).
>
> Good idea. Patch attached.

I prefer calling it mingw32-win2k, but I don't really care.  I won't
be using it anyway.

> By the way, how does mingw32ce cope with this define?
>
>> In my opinion, setting the platform define depending on what OS version
>> we're targeting and letting the normal configure check find out what's
>> supported and what's not is cleaner than adding even more platform
>> specific ifdefs to the network code.
>
> Yes, I think that's cleaner too, I just wasn't sure it would be this
> easy to disable whatever code won't be supported at the end of your
> patchset.
>
> Index: configure
> ===================================================================
> --- configure	(revision 21228)
> +++ configure	(working copy)
> @@ -2023,8 +2023,9 @@
>              { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
>          ;;
>      mingw32*)
> -        # Only WinXP or greater are supported
> +        if test $target_os != "mingw32-prexp"; then
>          add_cflags -D_WIN32_WINNT=0x0501
> +        fi

test && add_cflags

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list