[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/6] use printf as $ECHO
From: |
Eric Blake |
Subject: |
Re: [PATCH 6/6] use printf as $ECHO |
Date: |
Mon, 10 Nov 2008 06:54:44 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Paolo Bonzini on 11/10/2008 4:07 AM:
>>>> Just for safety, shouldn't the test use '%s\n' rather than bare %s (in
>>>> other
>>>> words, make our test match our usage pattern)?
>>> _AS_ECHO_PREPARE does the same...
>> Here's a chance to fix both at once. :-)
>
> To be more precise, Autoconf also needs an "echo -n" emulation, so it
> does use "printf %s" too. I just copied the assumption that if one
> works, the other does too.
After more thought, I'm okay with that assumption. printf(1) is a new
enough invention that all known implementations, even non-builtins, manage
\n format sequence correctly.
> 1) portability. I looked again at Sven Mascheck's pages, and you're
> probably thinking of http://www.in-ulm.de/~mascheck/various/uuoc/ where
> he says:
>
> Here documents [used with cat] force `as-is' output, if there are
> character sequences which are special to echo(1), and if printf(1) is
> not available".
Equally as expensive as when printf exists but not as a builtin. Can't
implement AS_ECHO_N, but that is not a problem for libtool's usage. So I
like the idea of using cat as the fallback, rather than 'printf of another
shell'.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkkYPSQACgkQ84KuGfSFAYChhQCgh8qvESxZuPyucESvvk1HFbLj
AIYAoM1+jhGhmKXE5fUZosMAfJNa6lzg
=0zkc
-----END PGP SIGNATURE-----
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), (continued)
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Ralf Wildenhues, 2008/11/22
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Paolo Bonzini, 2008/11/22
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Eric Blake, 2008/11/22
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Eric Blake, 2008/11/22
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Ralf Wildenhues, 2008/11/23
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Eric Blake, 2008/11/23
- Re: [PATCH 6/6] use print or printf or cat as $ECHO (really), Ralf Wildenhues, 2008/11/23
- Re: [PATCH 6/6] use print or printf or cat as $ECHO, Eric Blake, 2008/11/10
- Re: [PATCH 6/6] use printf as $ECHO,
Eric Blake <=
- Re: [PATCH 6/6] use printf as $ECHO, Ralf Wildenhues, 2008/11/10
- Re: [PATCH 6/6] use printf as $ECHO, Sven Mascheck, 2008/11/10
- Re: [PATCH 6/6] use printf as $ECHO, Ralf Wildenhues, 2008/11/11