]> git.ipfire.org Git - thirdparty/libtool.git/commit
Exploit shell arithmetic expansion and ${#var}.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 19 Apr 2008 16:24:48 +0000 (18:24 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 19 Apr 2008 16:24:48 +0000 (18:24 +0200)
commitda1e14c91cb42dbb3a0e0ac4ee968d0cbcd3c977
tree7d5a2c8d16d2cad37ff4cc9fe88849f0e0bb14cc
parent3b98dabaa4c3ed8a07928d1ef883879a476eac94
Exploit shell arithmetic expansion and ${#var}.

* libltdl/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Also check
for arithmetic expansion, and ${#var}.
(_LT_PROG_XSI_SHELLFNS): Define func_arith and func_len
accordingly, falling back on 'expr'.  Note that the argument to
func_len may not start with a hyphen.  In the pre-Posix
fallback, take care not to rely on the exit status of the
variable assignment (not portable), but set the length to
$max_cmd_len instead.
* libltdl/config/ltmain.m4sh (func_mode_link): Use func_arith
and func_len throughout for integer arithmetic, fixing
quadratical amount of counting for reloadable object and
piecewise archive linking.  Change all comparisons with
max_cmd_len to test for smaller, non-equal length.
* THANKS: Update.
Suggested by Roland Mainz.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
THANKS
libltdl/config/ltmain.m4sh
libltdl/m4/libtool.m4