[Ffmpeg-devel] Network patch for MingW users

Alex Beregszaszi alex
Wed Feb 21 16:27:42 CET 2007


Hi,

> >> Actually, I don't like the neterrno macro at all.  I'd prefer a macro
> >> for retrieving the error code and some form of translation from E* codes
> >> to WS* codes.  The former of these would simply return errno on POSIX
> >> systems and call WSAGetLastErrorUsingAnUglyFunctionName() on Windows.  The
> >> latter I don't know exactly what is required for.
> >
> > Actually neterrno() does the same what you say.
> 
> Does not.  In the patch you sent, it compares something to the supplied
> argument, which I find confusing.  That's not how things normally operate.

??

av_neterrno(err) compares err to errno on unix
av_neterrno(err) compares WSAerr to WSASomething() on windows

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.

--
Alex Beregszaszi






More information about the ffmpeg-devel mailing list