[Ffmpeg-devel] Network patch for MingW users
Alex Beregszaszi
alex
Wed Feb 21 16:50:46 CET 2007
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_ ?
> 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.
--
Alex Beregszaszi
More information about the ffmpeg-devel
mailing list