This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
CR/NL problem with cpp.exe under Cygwin
- From: "Kris Warkentin" <kewarken at qnx dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Tue, 1 Oct 2002 14:48:30 -0400
- Subject: CR/NL problem with cpp.exe under Cygwin
Hello,
I also mailed this to the Cygwin mailing list but I think this one might be
more appropriate.
Our Windows hosted development tools are compiled under Cygwin and I'm
observing a strange problem with Dos style text files not being
pre-processed correctly. Specifically, something like this:
printf("This is a long string across\
multiple lines");
or a backslashified #define is not being concatenated. Now, if I use the
Cygwin
cpp.exe, I get the following (expected) behaviour:
cpp.exe dosfile.c # works fine - cygwin.dll does input translation
cpp.exe < dosfile.c # doesn't work since shell isn't doing input translation
However with our cpp, it doesn't work in either case. I've looked at the
code for cpp and it doesn't do anything special, just ordinary opens and
fopens. From what I understand of the way cygwin.dll works, this should be
fine and they should be opened as text files but in our case, it doesn't
seem to happen.
What am I missing? Is there some sort of define or configure option that I
should be using to make this work properly? It can't be the $CYGWIN
variable since the cygwin cpp.exe works fine in the same environment as ours
so I'm at a complete loss.
cheers,
Kris