SUNWcc related fixes for normal and MKSH_SMALL

This commit is contained in:
tg 2009-09-23 18:22:38 +00:00
parent 1a28786229
commit f00db85c98
2 changed files with 19 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.423 2009/08/30 13:22:37 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.424 2009/09/23 18:22:37 tg Exp $'
#- #-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Thorsten Glaser <tg@mirbsd.org> # Thorsten Glaser <tg@mirbsd.org>
@ -912,11 +912,23 @@ NOWARN=$save_NOWARN
# #
if ac_ifcpp 'ifdef MKSH_SMALL' isset_MKSH_SMALL '' \ if ac_ifcpp 'ifdef MKSH_SMALL' isset_MKSH_SMALL '' \
"if a reduced-feature mksh is requested"; then "if a reduced-feature mksh is requested"; then
if test $ct = xlc; then #XXX this sucks; fix it for *all* compilers
ac_flags 1 fnoinline -qnoinline case $ct in
else clang|icc|nwcc)
ac_flags 1 fnoinline -fno-inline ac_flags 1 fnoinline -fno-inline
fi ;;
gcc)
NOWARN=$DOWARN; phase=u
ac_flags 1 fnoinline -fno-inline
NOWARN=$save_NOWARN; phase=x
;;
sunpro)
ac_flags 1 fnoinline -xinline=
;;
xlc)
ac_flags 1 fnoinline -qnoinline
;;
esac
: ${HAVE_MKNOD=0} : ${HAVE_MKNOD=0}
: ${HAVE_REVOKE=0} : ${HAVE_REVOKE=0}

4
var.c
View File

@ -22,7 +22,7 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.90 2009/09/23 18:04:58 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/var.c,v 1.91 2009/09/23 18:22:38 tg Exp $");
/* /*
* Variables * Variables
@ -1450,7 +1450,7 @@ set_array(const char *var, bool reset, const char **vals)
if (*ccp == ']' && level == 0 && ccp[1] == '=') { if (*ccp == ']' && level == 0 && ccp[1] == '=') {
strndupx(cp, vals[i] + 1, ccp - (vals[i] + 1), strndupx(cp, vals[i] + 1, ccp - (vals[i] + 1),
ATEMP); ATEMP);
evaluate(substitute(cp, 0), &n, evaluate(substitute(cp, 0), (mksh_ari_t *)&n,
KSH_UNWIND_ERROR, true); KSH_UNWIND_ERROR, true);
ccp += 2; ccp += 2;
} else } else