[FFmpeg-devel] [PATCH] O_BINARY for ffserver

Ramiro Polla ramiro
Sat Jul 14 05:07:42 CEST 2007


Hello,

Fran?ois Revol wrote:
>>  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)
>
>   

Hmm... That doesn't work on MinGW. There is no fcntl(). Everything I 
looked at points to setmode().

How about attached patch?

Ramiro Polla
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config_set_o_binary.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070714/f67cbf0c/attachment.txt>



More information about the ffmpeg-devel mailing list