[FFmpeg-devel] libossupport status

Rich Felker dalias
Mon Dec 24 14:39:06 CET 2007

On Sun, Dec 23, 2007 at 03:36:29PM +0100, Michael Niedermayer wrote:
> On Sun, Dec 23, 2007 at 05:51:51AM -0500, Rich Felker wrote:
> > On Sat, Dec 22, 2007 at 09:11:19PM +0100, Michael Niedermayer wrote:
> > > > For example on win32  close()  will not accepts socket handles  and 
> > > > select()  will not work on file handles, meaning
> > > 
> > > If win32 supports closing sockets, there should be a function doing that,
> > 
> > The problem is whether it's always possible to tell, given a win32
> > pseudo-fd, whether it's a fd or a socket. Mingw is actually already
> > emulating fds on top of win32 HANDLE crap, renumbering them for
> > semi-posix-conformance, but sadly does not do the same for sockets. It
> > could (and should) be fixed to do so and unify them.
> yes, of course should it be fixed in mingw, that would be ideal but until
> than we need some workaround ...
> also if normal fds on mingw count from 0,1,2,3,... and sockets are pointers
> they should be distingishable unless there are really many files open (which
> windows doesnt support i suspect ...)

That's what I suspected. On windows actually both are pointers (or
rather HANDLE) if you use the win api functions, and mingw
nonsensically translates disk files to small integers starting at 0
(necessary) but without doing the same for sockets. This is why I
think they should fix their broken crap..

> > > that can then be used. If it supports the equivalent of select() on files
> > 
> > The equivalent of select on files is to always return true. RTFM
> > posix. :)
> i always keep forgetting the url of the official posix docs :)



More information about the ffmpeg-devel mailing list