libtool
[Top][All Lists]
Advanced

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

Re: func_infer_tag() broken


From: Gary V. Vaughan
Subject: Re: func_infer_tag() broken
Date: Tue, 02 Mar 2004 12:31:48 +0000
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

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

bonzini wrote:
|  > I've used return in a couple of places (twice with an integer return
| value),
|  > which I fear may break on old platforms.  Otherwise I've assumed that
| all
|  > shell variables are in global scope, and that positional parameters are
|  > stacked and restored at function call boundaries to an arbitrary nesting
|  > limit.
|
| No, return is pretty safe.

Okay that's a relief.  Thanks.

At a slight tangent;  maybe m4sh could provide a shell function calling macro
(off the top of my head):

# AS_CALL_FUNC func_name [args ...]
# ---------------------------------
AS_DEFUN([AS_CALL_FUNC],
[_as_save_positional_params=$${1+"$$@"}
$*
eval set -- $$_as_save_positional_params
])

| It should be even with an integer return value.  If you are at the
| end of a function (or in an if just before the end of the function, you
| got it) it is possible to replace it with (exit NUM), but I don't see a
| good reason to do so.

Doesn't the exit actually terminate the script for (at least) some shells?

BTW, we're thinking of moving the generation of ltmain.sh to m4sh when the
shell function support in autoconf pans out...

Cheers,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFARH60FRMICSmD1gYRAiS7AKDENQuuig5RootP4NntsWS632kg4wCgpqgA
/L0SdMypUCa99XSuGNqVYPo=
=dxQt
-----END PGP SIGNATURE-----




reply via email to

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