Eric Blake wrote: > According to Paolo Bonzini on 10/15/2008 5:32 AM: >> With this patch, the better-shell loop is always executed, even if >> it is a no-op. Unfortunately I could not find a better way to >> make things go in the appropriate diversion for both "correct" >> scripts and Libtool scripts. However, the next patch will anyway >> add a test that is always executed (in order to find a shell with >> functions and unset), so this pessimization is only temporary. > > I thought that all shells with functions also have unset, per the history > of bourne shell page referred to earlier.
Yes. But up until now, M4sh skipped the "find better shell" loop if not necessary. With this patch it inserts it always. But anyway, it would be inserted by the AS_UNSET patch, which needs to find a shell with functions *in order to use unset safely*. > Well, backwards compatibility can be gross. As a followup patch, we > should also massage the manual to move AS_SHELL_SANITIZE into the node on > obsolete macros, and NEWS to mention that new scripts should not invoke it > (AS_INIT is sufficient). But that doesn't stop checking in this patch; > please commit, with this nit addressed. Ok. >> -[_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl >> +[AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl > > Did I miss where you created AS_DETECT_REQUIRED? No, I forgot to massage the patch before sending it out. :-) Anyway what I commit is always tested more thoroughly than what I send out. :-) Paolo
