public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amylaar at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/45888] tm.texi generation is not portable, rule is broken
Date: Sat, 20 Nov 2010 01:57:00 -0000	[thread overview]
Message-ID: <bug-45888-4-IPZGF1s5zD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-45888-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45888

--- Comment #13 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2010-11-20 01:31:12 UTC ---
(In reply to comment #12)
> (In reply to comment #11)
> > Does the generated tm.texi still have carriage return characters?
> > Or is there some other difference to the tm.texi in $(srcdir)/doc ?
> 
> When opening tm.texi under Word, I see ¶ character at the end of the lines. It
> must be the carriage return.

I'm not sure - it's been ages since I had to use minicom on DOS for the lack
of a terminal program on Linux (There's been seyon since... ISPs... and ADSL.)

Do you have od installed under cygwin?
You could try
od -x tm.texi|less
to fine out what really is in there.  Or you could use hexdump if you have
that, but not od.

[joern@laria gcc]$ od -x tm.texi|head -5
0000000 6340 4320 706f 7279 6769 7468 2820 2943
0000020 3120 3839 2c38 3931 3938 312c 3939 2c32
0000040 3931 3339 312c 3939 2c34 3931 3539 312c
0000060 3939 2c36 3931 3739 312c 3939 2c38 3931
0000100 3939 322c 3030 2c30 3032 3130 0a2c 6340

Notice the penultimate byte pair in the last line above.  0a is newline.
carriage return would show up as 0d .

Assuming you actually have a carriage return there, I wonder where things
go wrong with the conversion.
On a Linux system, echo will not emit a carriage return by default, but
I can ask it to:

[amylaar@meolyon ~]$ echo -e '\r' |od -x
0000000 0a0d
0000002

You should be getting two carriage returns (0d) on cygwin with that command.

And then I can filter out the carriage return with the tr command used in
the makefile:

[amylaar@meolyon ~]$ echo -e '\r' |tr -d '\015'|od -x
0000000 000a
0000001

The case statement can also be tested separately:
[amylaar@meolyon ~]$ case `echo X|tr X '\101'` in \
>            A) echo ascii;;\
>            *) echo ebdic;;\
>          esac
ascii

Could you cut & paste this into a bash shell under cygwin and report the
results?

echo -e '\r' |od -x

echo -e '\r' |tr -d '\015'|od -x

case `echo X|tr X '\101'` in \
           A) echo ascii;;\
           *) echo ebdic;;\
         esac


  parent reply	other threads:[~2010-11-20  1:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  5:30 [Bug bootstrap/45888] New: " rwild at gcc dot gnu.org
2010-10-05  8:33 ` [Bug bootstrap/45888] " schwab@linux-m68k.org
2010-10-05 18:19 ` fxcoudert at gcc dot gnu.org
2010-10-05 23:39 ` amylaar at gcc dot gnu.org
2010-10-05 23:59 ` joseph at codesourcery dot com
2010-10-07  4:57 ` rwild at gcc dot gnu.org
2010-10-07  8:03 ` amylaar at gcc dot gnu.org
2010-10-07 18:34 ` Ralf.Wildenhues at gmx dot de
2010-11-15 15:00 ` amylaar at gcc dot gnu.org
2010-11-15 15:46 ` amylaar at gcc dot gnu.org
2010-11-18 15:13 ` amylaar at gcc dot gnu.org
2010-11-19 15:57 ` rwild at gcc dot gnu.org
2010-11-20  0:16 ` anhvofrcaus at gmail dot com
2010-11-20  0:47 ` amylaar at gcc dot gnu.org
2010-11-20  1:31 ` anhvofrcaus at gmail dot com
2010-11-20  1:57 ` amylaar at gcc dot gnu.org [this message]
2010-11-24  0:28 ` cestrauss at gmail dot com
2010-11-25  8:17 ` amylaar at gcc dot gnu.org
2010-11-30  1:12 ` anhvofrcaus at gmail dot com
2010-11-30  7:35 ` Ralf.Wildenhues at gmx dot de
2010-11-30 17:20 ` anhvofrcaus at gmail dot com
2010-12-02 23:39 ` cestrauss at gmail dot com
2010-12-03  0:47 ` amylaar at gcc dot gnu.org
2010-12-03 17:46 ` anhvofrcaus at gmail dot com
2010-12-03 17:57 ` amylaar at gcc dot gnu.org
2010-12-03 18:08 ` anhvofrcaus at gmail dot com
2010-12-03 18:15 ` amylaar at gcc dot gnu.org
2010-12-03 21:36 ` amylaar at gcc dot gnu.org
2010-12-03 22:35 ` anhvofrcaus at gmail dot com
2010-12-03 23:24 ` anhvofrcaus at gmail dot com
2010-12-04  1:04 ` amylaar at gcc dot gnu.org
2010-12-07 17:13 ` anhvofrcaus at gmail dot com
2010-12-10  2:05 ` amylaar at gcc dot gnu.org
2010-12-11  0:54 ` anhvofrcaus at gmail dot com
2010-12-11  3:51 ` amylaar at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-45888-4-IPZGF1s5zD@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).