This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Build arm-elf-gdb on mingw host
> Date: Mon, 26 Sep 2005 10:08:41 -0400
> From: Christopher Faylor <email@example.com>
> I think I get it. This patch just modifies chew so that it always
> outputs '\n'. Then you see '\n' on input no matter what.
> Would it be possible to just link with binmode.o under mingw (and cygwin for
> that matter)?
If the problem is with MSYS's makeinfo, then it's IMHO wrong to solve
it in chew. Besides, the suggested change, viz
+/* Prevent \r\n\ line endings */
+unsigned int _CRT_fmode = _O_BINARY;
is too general: it switches _all_ file I/O for _all_ files to binary
mode, in _all_ MinGW builds. Thus, if the file chew reads is edited
with some Windows editor that doesn't preserve line-endings (Emacs
does), then chew itself might fail.
Even if currently this change doesn't cause any trouble, it could be a
time bomb: imagine that at a later date someone adds code to chew that
reads some other file--we don't want to remember then to open it
explicitly in text mode to prevent bugs.
So I'm against this fix. If MSYS makeinfo is the culprit, let them
fix it, or let them use another port, which does TRT.