This is the mail archive of the
mailing list for the Cygwin project.
RE: Using windows text mode without setup.exe
David Dyck wrote on 09 April 2008 20:37:
> On Wed, 9 Apr 2008 at 11:51 -0700, mjumbe@... wrote:
>> .... The application needs read from and write to files in
>> text mode (i.e. using CRLF format). This works fine on my development
>> machine, because I can just use the Cygwin setup program to specify
>> the Windows text mode as default. However, when I package up my
>> distribution with the Cygwin dll and install it elsewhere, the program
>> writes UNIX linefeeds.
> In the open() function call, binary mode can be specified with the
> flag O_BINARY and text mode with O_TEXT.
Alternatively, if you don't want to go through your application fixing the
file open calls, you can just link it against textmode.o, which will cause all
your files to be opened in textmode by default. See also
Can't think of a witty .sigline today....
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html