[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for best option



Bruce,

Make sure you've removed *both* O_TEXTDATA and O_TEXT_CREAT. 
Technically, O_TEXTDATA is the culprit.  (But, O_TEXT_CREAT requires 
O_TEXTDATA to be specified)

As I've said many times now, your data is NOT TEXT, it's binary data. 
When you specify O_TEXTDATA you're telling the open() API "my data is 
text data".  Think about it.


Bruce Reynolds wrote:
> Okay so my real problem was specifying O_TEXT_CREAT flag.
> 
> I was coding:
> fd = open( '/tmp/filename.tif'       
>          : O_WRONLY + O_CREAT + O_CCSID            
>             + O_TEXTDATA + O_TEXT_CREAT                          
>          : S_IRUSR + S_IWUSR + S_IRGRP + S_IROTH   
>          : 819                                     
>          : 0 );              
> 
> You coded:
> fd = open( '/tmp/filename.tif'        
>           : O_WRONLY + O_CREAT + O_EXCL             
>           : S_IRUSR + S_IWUSR + S_IRGRP + S_IROTH );                      
> 
> If I remove the O_TEXT_CREAT on my open I'm still able to view the image.
> 
>  
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------