bug-autoconf
[Top][All Lists]
Advanced

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

Re: ./configure vs. user-defined bash function "print"


From: Chet Ramey
Subject: Re: ./configure vs. user-defined bash function "print"
Date: Fri, 01 Aug 2014 09:42:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

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

On 8/1/14, 5:51 AM, Mike Frysinger wrote:
> On Tue 08 Jul 2014 06:51:46 Greg Minshall wrote:
>> hi.  the following fragment from a ./configure
>> ----
>> # Prefer a ksh shell builtin over an external printf program on Solaris,
>> # but without wasting forks for bash or zsh.
>> if test -z "$BASH_VERSION$ZSH_VERSION" \
>>     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
>>   as_echo='print -r --'
>>   as_echo_n='print -rn --'
>> elif
>> ----
>> plays poorly with a user-defined bash function named "print" (basically,
>> a front end to pr(1)).
> 
> how would a user-defined bash function be a problem ?  unless you're sourcing 
> the configure script, a new shell instance is launched to process configure.  
> in non-interactive mode, bash doesn't load any files (except via BASH_ENV, 
> but 
> that's a really bad idea to use).

If you're really worried about a stray exported function conflicting with
this name, add `unset -f print 2>/dev/null' and go on.

- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlPbmV4ACgkQu1hp8GTqdKuaTwCbBVcf5KXT8Fstbt7lLE5JWJiw
RScAnjloPY5NMN7FhGupbD4Xu+HyQQ2n
=tiuy
-----END PGP SIGNATURE-----



reply via email to

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