[FFmpeg-devel] defining O_BINARY for OS/2

Ramiro Polla ramiro
Mon Jul 30 01:03:04 CEST 2007


Dave Yeo <daveryeo <at> telus.net> writes:

 > Hi, I noticed at about line 99 in libavformat/file.c this code block
 > #ifdef O_BINARY
 >     setmode(fd, O_BINARY);
 > #endif
 > but I can not find where it gets defined. For OS/2 should I be defining
 > it myself? How does Windows define it? or does Windows still need it?
 > Perhaps it should just always be defined? Seems to me that on *nixes it
 > doesn't make any difference whether they use binary or not..
 > Dave

O_BINARY is defined in fcntl.h IIRC. This is wrong anyways, since Fran?ois Revol
pointed out O_BINARY is defined in BeOS but setmode() does something completely

setmode() must be used on Windows since stdin can't be closed and re-opened. At
least I failed when I tried. I didn't find a clean solution yet, and I'm away
for at least another week...

IMHO this should be reverted to a fragile OS list like it was before I started
trying to simplify it.

Ramiro Polla

More information about the ffmpeg-devel mailing list