This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Strange standard out in B20
- To: gnu-win <gnu-win32 at cygnus dot com>
- Subject: Re: Strange standard out in B20
- From: Eugene Kanter <eugene at bgs dot com>
- Date: Tue, 08 Dec 1998 12:11:40 -0500
- References: <366C4C41.CEB08430@bgs.com>
Eugene Kanter wrote:
> When I run an application (rpm.exe from Red Hat) under bash and redirect
> output to a file, I get DOS style \r\n end of lines. However if I do the
> same (rpm -qa > file.txt) under cmd.exe, only \n appears at the end of
> file, whis is not what Notepad.exe can handle. Any ideas?
I received a suggest to include
# if defined(__WINNT__)
setmode( 1, O_TEXT );
setmode( 2, O_TEXT );
# endif
in the beginning of main() (and make sure fcntl.h is included) which did
the desired.
Thanks all.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".