libtool-patches
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: Re: [PATCH 6/6] use print or printf or cat as $ECHO (really)
Date: Sat, 22 Nov 2008 07:37:03 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

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

According to Eric Blake on 11/22/2008 7:31 AM:
> Maybe a better suggested test would be one that checks for either print or
> printf (that way, a Solaris machine will let ksh pass the suggested test).
>    Since the overall test is running with stderr silenced, we don't even
> have to worry about messages about command not found.  In other words, why
> not:
> 
> test "X`print -r -- $ECHO`" = "X$ECHO" \
>  || test "X`printf %s $ECHO`" = X$ECHO"

Scratch that; Solaris /bin/sh passes that test, so we wouldn't favor ksh.
 It really boils down to finding a shell with either print or a builtin
printf, so I think we have to play the PATH games, and expend the extra
fork in looking :(  At least we can hard-code the fact that ZSH_VERSION or
BASH_VERSION implies a builtin printf, to skip the forks on those shells.

- --
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

iEYEARECAAYFAkkoGQ8ACgkQ84KuGfSFAYBUUACfSnEOeNxt190rKmNMRWpHbd2x
560AoK3c92s6Czz2tCIyyUH3oQAywo5m
=8rWl
-----END PGP SIGNATURE-----




reply via email to

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