diff --git a/src/cmd/INIT/Makefile b/src/cmd/INIT/Makefile index 1d61b2e7b..c39876283 100644 --- a/src/cmd/INIT/Makefile +++ b/src/cmd/INIT/Makefile @@ -60,7 +60,7 @@ cc ld ldd :PACKAGE_INIT: mamake.c proto.c ratz.c release.c cc.sco.i386 \ cc.sgi.mips2 cc.sgi.mips3 cc.sgi.mips3-o32 cc.sgi.mips4 \ cc.sgi.mips4-n32 ldd.sgi \ - cc.unix.mc68k + cc.unix.mc68k cc.unixware.i386 LICENSE : .DONTCARE diff --git a/src/cmd/INIT/cc.unixware.i386 b/src/cmd/INIT/cc.unixware.i386 new file mode 100755 index 000000000..b1b1a2cb7 --- /dev/null +++ b/src/cmd/INIT/cc.unixware.i386 @@ -0,0 +1,9 @@ +: unixware.i386 cc wrapper + +HOSTTYPE=unixware.i386 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/bin/cc -D_XOPEN_UNIX -D_XOPEN_SOURCE_EXTENDED "$@" diff --git a/src/cmd/ksh93/bltins/typeset.c b/src/cmd/ksh93/bltins/typeset.c index c1d4bae7f..45533ff7d 100644 --- a/src/cmd/ksh93/bltins/typeset.c +++ b/src/cmd/ksh93/bltins/typeset.c @@ -196,8 +196,9 @@ int b_typeset(int argc,register char *argv[],Shbltin_t *context) Namdecl_t *ntp = (Namdecl_t*)context->ptr; Dt_t *troot; int isfloat=0, shortint=0, sflag=0; - char *new_argv[argc + 1]; + char **new_argv; + new_argv = (char **)stakalloc((argc + 2) * sizeof(char*)); memset((void*)&tdata,0,sizeof(tdata)); tdata.sh = context->shp; troot = tdata.sh->var_tree; diff --git a/src/lib/libast/features/standards b/src/lib/libast/features/standards index ba9264d9b..1d329ea8a 100644 --- a/src/lib/libast/features/standards +++ b/src/lib/libast/features/standards @@ -6,9 +6,9 @@ set stdio # careful that we don't get fooled by presence of FreeBSD that underpins some # subsystems in Mac OS X; there are other Apple-specific portability hacks # elsewhere we should not interfere with. -if tst note{ FreeBSD or DragonFly BSD }end compile{ +if tst note{ FreeBSD, DragonFly BSD, or UnixWare }end compile{ #include - #if (!defined(__FreeBSD__) && !defined(__DragonFly__)) || defined(APPLE) + #if (!defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__USLC__)) || defined(APPLE) #error not a FreeBSD or DragonFly BSD system #endif }end {