----- Original Message -----
From: Paul Brook paul@nowt.org
To: openbios@openbios.org
Cc: Nathan Kunkee nkunkee42@hotmail.com
Sent: Wednesday, May 4, 2011 7:19 PM
Subject: Re: [OpenBIOS] Solaris anyone? Q2
crosscflags()
{
- local host=$1
- local target=$2
+ host=$1
+ target=$2
Confirmed; this produces the correct result with /bin/sh (ksh93), bash,
and /usr/xpg4/bin/sh.
Have you tried separating the declaration and the definition. i.e.:
local host
host=$1
IIRC there are sometimes issues when you combine the two.
Paul
--
OpenBIOS
http://openbios.org/
Mailinglist:
http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you
Yes, I have tried that. Korn Shell '93 (ksh93) does not include the builtin "local", that is bash/zsh-specific:
kens@sunos:~$ ken() {
> local kenny
> kenny=1
> }
kens@sunos:~$ ken
/bin/sh[2]: local: not found [No such file or directory]
kens@sunos:~$ type local
/bin/sh: whence: local: not found
kens@sunos:~$ ^D
11:04 PM kens@sunos$ type local
local is a shell builtin
Also there really is no need to rename the variables from host and target because they're not used for any unrelated purposes elsewhere in switch-arch.
The patch I had submitted is valid.
Ken