[FFmpeg-devel] [PATCH] replace setmode() by fcntl()

Víctor Paesa wzrlpy
Fri Mar 28 23:07:41 CET 2008


> > I've talked about it long ago but never bothered to send a patch.
> > setmode() is not portable. There is a BSD setmode() that differs from
> > the MSDOS version that is used there. Since O_BINARY can be defined
> > ouside of MSDOS, this breaks those platforms.
> >
> > fcntl(F_SETFL) should replace it in a more portable way.
> > However I'm not sure it's available on mingw or other supported
> > platforms, please test.
> > Else we'd have to check in configure.

> I cant test this at the moment. Can anyone else under MinGW test it,
> please?
> I believe Cygwin must test this too...

It compiles fine under Cygwin.
It won't work if I cross-compile for MinGW (mingw-runtime 3.14-1), as
neither fcntl() nor F_SETFL are available.


More information about the ffmpeg-devel mailing list