This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Build arm-elf-gdb on mingw host


On Mon, Sep 26, 2005 at 09:23:26AM -0400, Daniel Jacobowitz wrote:
>On Mon, Sep 26, 2005 at 05:46:17AM +0100, Dave Murphy wrote:
>> Sorry, I should have said that under mingw/msys files read in text mode 
>> have line endings converted. There are numerous places in chew.c where 
>> it checks for a newline character with expressions like "while (at (tos, 
>> idx) == '\n')", see skip_white_and_stars(src,  idx), 
>> strip_trailing_newlines(),  remove_noncomments (src, dst), 
>> outputdots(),  courierize(),  bulletize(), copy_past_newline (ptr, idx, 
>> dst), kill_bogus_lines(), indent(), skip_past_newline () and  nextword 
>> (string, word). It seemed easier to just read the input files as binary 
>> and suppress the conversion rather than make all the code deal with the 
>> "/r/n" sequence.
>
>I'm afraid this explanation doesn't leave me any more enlightened.  Are
>you saying that opening files in text mode, in mingw, produces \r\n in
>the program view if there was originally just a \n?

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)?

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]