[Ffmpeg-devel] Network patch for MingW users

Måns Rullgård mans
Wed Feb 21 17:10:58 CET 2007


Alex Beregszaszi said:
> Hi,
>
>> > av_neterrno(err) compares err to errno on unix
>> > av_neterrno(err) compares WSAerr to WSASomething() on windows
>>
>> Yes, and I don't like it that way.
>>
>> > In case the WSAerr part irritates you, how would you solve this? Adding
>> > a huge switch/case blob? After all you hate #ifdefs in other part of the
>> > code, including the errno handling, thus we need to pass only unix errno
>> > name, not windows ones.
>>
>> I had something like this in mind:
>>
>> #if SANE_SYSTEM
>> #define ff_network_errno() errno
>> #define FF_NETWORK_ERROR(err) err
>> #elif WINDOWS
>> #define ff_network_errno() WSAError()
>> #define FF_NETWORK_ERROR(err) WSA##err
>> #endif
>>
>> /* ... */
>>
>> if(ff_network_errno() == FF_NETWORK_ERROR(EFOO)){
>>     deal_with_it();
>> }
>
> What about ff_net_ and FF_NET_ ?

Whatever.

>> It's slightly more code, but it makes the code easier to understand without
>> looking up the definitions of the macros.
>
> Can we do a short voting about this now?
>
> I perfectly ok with both systems.

Fine, then what is there to vote about?  Besides, I'm against voting over
design decisions.  Whoever is right should get to decide, not whoever has
the loudest voice.

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




More information about the ffmpeg-devel mailing list