Re: [PATCH 6/6] use print or printf or cat as $ECHO

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paolo Bonzini on 11/10/2008 5:06 AM:
>> 1) I don't have access to systems that are old or weird enough to check
>> if the performance penalty will happen often.  What do you think?

A single-fork fallback is better than nothing, and better than any expr or
other multi-fork fallback.  But preferring a builtin is definitely the way
to go.

>>
>> 2) If ksh had a way to print without interpreting escapes *and dashes*,
>> I'd be glad to add it; do you know one?
> 
> I thought of one after lunch: "print -r -- FOO".  This way we can print
> without forking on bash, zsh, ksh, ash/dash.

'man print' on Solaris 10 shows that ksh also understands "print -R -" as
a way to print "-" (but not "-n" or "--").  But you are right in realizing
that "print -r --" seems to work nicely.

At any rate, that means we should probably teach m4sh to try "print -r --"
as one of its options, prior to "printf %s\\n", during _AS_ECHO_PREPARE.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@xxxxxxx
-----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

iEYEARECAAYFAkkYOQcACgkQ84KuGfSFAYAOOwCdEpPvxch0jfDi1Mv2Okalm/vI
KbIAn2407Ron5tQfg3rGAlIUqYKoeoSQ
=K5/F
-----END PGP SIGNATURE-----


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux