[FFmpeg-devel] [PATCH] O_BINARY for ffserver
François Revol
revol
Fri Jul 13 22:26:09 CEST 2007
> wrote:
> >> Hi,
> >>
> >> albeit I dislike this way, it looks like this is now the preferred
> >> one
> >> ffmpeg.
> >>
> >
> > The existing way is not acceptable anyway.
> > It breaks the build on BeOS. BeOS defines O_BINARY for
> > compatibility
> > but doesn't have setmode(), btw setmode() is DOS-only, and BSD has
> > its
> > own setmode() for something totally different, so this is highly
> > dangerous to use.
> >
> >
>
> Can't fcntl be used instead? Anyways I wasn't aware setmode() was
> DOS-only. It should be checked in cofigure.
>
Yes, something like:
fcntl(fd, F_SETFL, O_BINARY);
http://www.delorie.com/djgpp/doc/libc/libc_309.html
But still it requires having a valid O_BINARY, so #ifdefing it.
Plus some OS might not support changing open mode, while using it in
open() would work. (don't know any but who knows)
Fran?ois.
More information about the ffmpeg-devel
mailing list