.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=108
This commit is contained in:
parent
b4455b8398
commit
674977cbdf
31
ksh93.dif
31
ksh93.dif
@ -510,9 +510,19 @@
|
|||||||
chmodf = lchmod;
|
chmodf = lchmod;
|
||||||
goto commit;
|
goto commit;
|
||||||
#else
|
#else
|
||||||
|
--- src/lib/libcmd/vmstate.c
|
||||||
|
+++ src/lib/libcmd/vmstate.c 2012-02-21 13:10:56.085934573 +0000
|
||||||
|
@@ -50,6 +50,7 @@ USAGE_LICENSE
|
||||||
|
|
||||||
|
#include <cmd.h>
|
||||||
|
#include <vmalloc.h>
|
||||||
|
+#include <sfdisc.h>
|
||||||
|
|
||||||
|
typedef struct State_s
|
||||||
|
{
|
||||||
--- src/cmd/ksh93/sh/init.c
|
--- src/cmd/ksh93/sh/init.c
|
||||||
+++ src/cmd/ksh93/sh/init.c 2012-02-20 10:33:24.362018545 +0000
|
+++ src/cmd/ksh93/sh/init.c 2012-02-20 10:33:24.362018545 +0000
|
||||||
@@ -508,24 +508,30 @@ static void put_cdpath(register Namval_t
|
@@ -508,25 +508,26 @@ static void put_cdpath(register Namval_t
|
||||||
static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
|
static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
|
||||||
{
|
{
|
||||||
register struct ifs *ip = (struct ifs*)fp;
|
register struct ifs *ip = (struct ifs*)fp;
|
||||||
@ -534,23 +544,22 @@
|
|||||||
- if(val != np->nvalue.cp)
|
- if(val != np->nvalue.cp)
|
||||||
- nv_putv(np, val, flags, fp);
|
- nv_putv(np, val, flags, fp);
|
||||||
- if(!val)
|
- if(!val)
|
||||||
+ nv_putv(np, NIL(char*), flags, NIL(Namfun_t*));
|
|
||||||
+
|
|
||||||
+ if((xp = nv_stack(np, NIL(Namfun_t*))) != fp)
|
+ if((xp = nv_stack(np, NIL(Namfun_t*))) != fp)
|
||||||
+ sfprintf(sfstderr, "BUG in %s:%s(%d) xp(%p) != fp(%p)\n",
|
+ sfprintf(sfstderr, "BUG in %s:%s(%d) xp(%p) != fp(%p)\n",
|
||||||
+ __FILE__, __FUNCTION__, __LINE__, xp, fp);
|
+ __FILE__, __FUNCTION__, __LINE__, xp, fp);
|
||||||
+ if(fp && !fp->nofree)
|
+ if(fp && !fp->nofree)
|
||||||
+ {
|
{
|
||||||
|
- fp->next = np->nvfun;
|
||||||
|
- np->nvfun = fp;
|
||||||
+ free((void*)fp);
|
+ free((void*)fp);
|
||||||
+ fp = NIL(Namfun_t*);
|
+ fp = NIL(Namfun_t*);
|
||||||
+ }
|
|
||||||
+ if(fp)
|
|
||||||
{
|
|
||||||
fp->next = np->nvfun;
|
|
||||||
np->nvfun = fp;
|
|
||||||
}
|
}
|
||||||
- else if(!val)
|
- else if(!val)
|
||||||
+ else
|
- np->nvfun = 0;
|
||||||
np->nvfun = 0;
|
+ nv_putv(np, NIL(char*), flags, fp);
|
||||||
|
+ if(fp)
|
||||||
|
+ fp->next = np->nvfun;
|
||||||
|
+ np->nvfun = fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user