-----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             [EMAIL PROTECTED]
-----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-----


Reply via email to