autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Shell functions and variables may share a namespace.


From: Ralf Wildenhues
Subject: Re: [PATCH] Shell functions and variables may share a namespace.
Date: Thu, 15 Nov 2007 07:58:40 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Eric,

* Eric Blake wrote on Thu, Nov 15, 2007 at 02:25:51AM CET:
> According to Ralf Wildenhues on 11/14/2007 2:01 PM:
> > * doc/autoconf.texi (Portable Shell): Mention Solaris sh limitation.
> > ---
> > OK to apply?
> 
> Yes.  Is it worth also mentioning the workaround that autotest uses of a
> reserved prefix like at_func_ for all functions?

Sure, why not.  Applied like this.

Thanks,
Ralf

    Shell functions and variables may share a namespace.
    
    * doc/autoconf.texi (Portable Shell): Mention Solaris sh
    limitation.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 12eef55..c7f8d2a 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12162,7 +12162,16 @@ you should not rely on the error status of a subshell 
if the last
 command of that subshell was @code{exit} or @code{trap}, as this
 triggers bugs in zsh 4.x; while Autoconf tries to find a shell that
 does not exhibit the bug, zsh might be the only shell present on the
-user's machine.
+user's machine.  Also, variables and functions may share a namespace,
+for example with Solaris 10 @command{/bin/sh}:
+
address@hidden
+$ @kbd{f () @{ :; @}; f=; f}
+f: not found
address@hidden example
+
address@hidden
+For this reason, Autotest uses the prefix @samp{at_func_} for its functions.
 
 Some ancient systems have quite
 small limits on the length of the @samp{#!} line; for instance, 32




reply via email to

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