Blame SOURCES/ksh-20120801-xufix.patch
|
|
61d8f4 |
diff -up ksh-20120801/src/cmd/ksh93/bltins/typeset.c.xufix ksh-20120801/src/cmd/ksh93/bltins/typeset.c
|
|
|
61d8f4 |
--- ksh-20120801/src/cmd/ksh93/bltins/typeset.c.xufix 2015-02-03 14:47:23.266022137 +0100
|
|
|
61d8f4 |
+++ ksh-20120801/src/cmd/ksh93/bltins/typeset.c 2015-02-03 14:47:23.308022046 +0100
|
|
|
61d8f4 |
@@ -93,6 +93,8 @@ int b_readonly(int argc,char *argv[],
|
|
|
61d8f4 |
memset((void*)&tdata,0,sizeof(tdata));
|
|
|
61d8f4 |
tdata.sh = context->shp;
|
|
|
61d8f4 |
tdata.aflag = '-';
|
|
|
61d8f4 |
+ /* do not change size */
|
|
|
61d8f4 |
+ tdata.argnum = -1;
|
|
|
61d8f4 |
while((flag = optget(argv,*command=='e'?sh_optexport:sh_optreadonly))) switch(flag)
|
|
|
61d8f4 |
{
|
|
|
61d8f4 |
case 'p':
|
|
|
61d8f4 |
diff -up ksh-20120801/src/cmd/ksh93/sh/name.c.xufix ksh-20120801/src/cmd/ksh93/sh/name.c
|
|
|
61d8f4 |
--- ksh-20120801/src/cmd/ksh93/sh/name.c.xufix 2015-02-03 14:47:23.281022105 +0100
|
|
|
61d8f4 |
+++ ksh-20120801/src/cmd/ksh93/sh/name.c 2015-02-03 14:52:08.768404194 +0100
|
|
|
61d8f4 |
@@ -3019,10 +3019,12 @@ void nv_newattr (register Namval_t *np,
|
|
|
61d8f4 |
nv_onattr(np,NV_EXPORT);
|
|
|
61d8f4 |
sh_envput(shp->env,np);
|
|
|
61d8f4 |
}
|
|
|
61d8f4 |
- if((n^newatts)==NV_EXPORT)
|
|
|
61d8f4 |
+ if((n^newatts)==NV_EXPORT && size==-1)
|
|
|
61d8f4 |
return;
|
|
|
61d8f4 |
}
|
|
|
61d8f4 |
oldsize = nv_size(np);
|
|
|
61d8f4 |
+ if (size == -1)
|
|
|
61d8f4 |
+ size = oldsize;
|
|
|
61d8f4 |
if((size==oldsize|| (n&NV_INTEGER)) && !trans && ((n^newatts)&~NV_NOCHANGE)==0)
|
|
|
61d8f4 |
{
|
|
|
61d8f4 |
if(size)
|