[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

as_echo/bs_echo still required?

From: Gary V. Vaughan
Subject: as_echo/bs_echo still required?
Date: Thu, 2 Jan 2014 15:23:06 +1300

Hi Paul,

Some time ago, with regard to my bootstrap rewrite, you suggested that the
hoop-jumping I do to find a backslash-friendly echo equivalent on the
host machine was probably overkill nowadays, and that it would be cleaner
to just use `printf '%s\n'` everywhere.

The bs_echo boilerplate in bootstrap is shared with libtoolize, libtool,
bootstrap and others with my funclib.sh library, and that in turn was mostly
copied from the as_echo guts of a recent Autoconf, with some additional gunk
that libtool has been carrying around for several years to cope with some of
the nasty delayed-evaluation of scriptlets containing backslashes stored in
shell variables dance it does at runtime - for which a non-backslash mangling
echo is essential.

Now, while I'd like to go ahead and make this change, which would save me
from a few $ECHO/$bs_echo related bug reports every year at least, this comment
still worries me:

  # There are still modern systems that have problems with 'echo' mis-
  # handling backslashes, among others, so make sure $bs_echo is set to a
  # command that correctly interprets backslashes.
  # (this code from Autoconf 2.68)

  # Printing a long string crashes Solaris 7 /usr/bin/printf.

And a little further down:

  # Prefer a ksh shell builtin over an external printf program on Solaris,
  # but without wasting forks for bash or zsh.

My current thinking is that I'd happily move to a printf-everywhere
simplification across the board, as long as Autoconf also committed to the
same improvement.  I'll provide the patches if there is a consensus to apply
them. But, it looks like doing so effectively deprecates Solaris 7 support,
which may be premature...


Gary V. Vaughan (gary AT gnu DOT org)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

reply via email to

[Prev in Thread] Current Thread [Next in Thread]