apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuri V. Vishnevskiy" <yuri.vishnevs...@gmail.com>
Subject Re: Newline chars in Win and OS/2
Date Thu, 10 Sep 2009 14:50:17 GMT

>> is this correct behaviour of the apr_file_puts function which prints a
>> "bla-bla-bla \n" string to file _without_ conversion of the \n to \r\n
>> sequence under Windows ans OS/2 ?
>>
> If the file is opened in text mode, not binary mode, then the o/s library
> should be handling the newline to CRLF conversion automatically.
>
> If that doesn't happen, then (1) is the file opened in binary mode and  
> (2)
> does that mean APR has to deal with aberrant implementations of the C
> standard I/O library on basic functionality?

No, I do not use APR_BINARY here.

Besides, APR_BINARY does not influence anything as can be seen from the  
code.

As I understand, in APR there is only one binary mode.

Then I do not understand why apr_file_open_std* and  
apr_file_open_flags_std* functions are implemented in APR. Because the  
corresponding streams should work in text mode only, which is not the case  
in Windows and OS/2. On the other hand I need these functions since I use  
poll functions with std* streams.

Best wishes,
Yura Vishnevskiy

Mime
View raw message