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

According to Eric Blake on 10/28/2008 9:53 PM:
> 
> In other words, we are now claiming that pdksh lacks $LINENO support, even
> though it does indeed support it in all the cases where the manual claims
> it is portable.  Any ideas on how to rewrite the test to avoid this false
> negative?

One thought I had was a post-process pass in m4.  Right now we have:
  as_required="AS_ESCAPE(m4_expand(m4_set_contents([_AS_DETECT_REQUIRED_BODY],
    m4_newline)))"

But something that would work on pdksh would be:

as_required="m4_bpatsubst(m4_dquote(m4_expand(m4_set_contents(
  [_AS_DETECT_REQUIRED_BODY], m4_newline))), [\\\$LINENO], [$LINENO])"
_AS_RUN(["$as_required"])

such that $LINENO is substituted in the definition of as_required, rather
than the eval.  Unfortunately, while that works for the current shell, it
gives the opposite problem - if the current shell supports LINENO but
lacks something else, then running the test on other shells has the
potential for false positives because $LINENO was already substituted.

We basically need two different values of as_required, one with literal
LINENO and the other with it pre-substituted.  Or maybe we can keep one
definition of $as_required, but with _AS_LINENO_WORKS rewritten to do two
tests, where the first test is m4_bpatsubst'd to occur at the time of
assignment to $as_required for the current shell, while the other is
passed on via $as_echo to the candidate shell, and declare that LINENO
works if at least one of the two tests pass?

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

Eric Blake             [EMAIL PROTECTED]
-----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

iEYEARECAAYFAkkH5xcACgkQ84KuGfSFAYAPDgCfYqnfDwJvL/XoF1I92l7wg35O
rokAoJsKi6ZjXq15ZQc9cc6Jyyvbf2p9
=76Up
-----END PGP SIGNATURE-----


Reply via email to