.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=152
This commit is contained in:
parent
7d6eba8317
commit
3f77b11686
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 19 16:48:37 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch ksh93-typedef.dif as found during debugging
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 19 15:14:00 UTC 2013 - werner@suse.de
|
Tue Mar 19 15:14:00 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
3
ksh.spec
3
ksh.spec
@ -114,6 +114,8 @@ Patch24: ksh93-builtin.dif
|
|||||||
Patch27: astksh_builtin_poll20120806_001.diff
|
Patch27: astksh_builtin_poll20120806_001.diff
|
||||||
# PATCH-FIX-UPSTREAM ksh93-env.dif [bnc#785266, bnc#803613]
|
# PATCH-FIX-UPSTREAM ksh93-env.dif [bnc#785266, bnc#803613]
|
||||||
Patch28: ksh93-env.dif
|
Patch28: ksh93-env.dif
|
||||||
|
# PATCH-FIX-UPSTREAM ksh93-typedef.dif
|
||||||
|
Patch29: ksh93-typedef.dif
|
||||||
# PATCH-EXTEND-UPSTREAM ksh93-pathtemp.dif [bnc#786134]
|
# PATCH-EXTEND-UPSTREAM ksh93-pathtemp.dif [bnc#786134]
|
||||||
# the fix is part of ksh93u+ 2012-06-28
|
# the fix is part of ksh93u+ 2012-06-28
|
||||||
# nevertheless the /dev/shm extension is useful
|
# nevertheless the /dev/shm extension is useful
|
||||||
@ -204,6 +206,7 @@ fi
|
|||||||
%patch24
|
%patch24
|
||||||
%patch27
|
%patch27
|
||||||
%patch28
|
%patch28
|
||||||
|
%patch29
|
||||||
%patch30
|
%patch30
|
||||||
%patch31
|
%patch31
|
||||||
%patch32
|
%patch32
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
--- src/cmd/ksh93/sh/macro.c
|
--- src/cmd/ksh93/sh/macro.c
|
||||||
+++ src/cmd/ksh93/sh/macro.c 2013-03-19 13:31:04.604732787 +0100
|
+++ src/cmd/ksh93/sh/macro.c 2013-03-19 17:16:46.062074381 +0100
|
||||||
@@ -54,6 +54,7 @@
|
@@ -54,6 +54,7 @@
|
||||||
#if SHOPT_MULTIBYTE
|
#if SHOPT_MULTIBYTE
|
||||||
# undef isascii
|
# undef isascii
|
||||||
@ -137,7 +137,16 @@
|
|||||||
int was_history = sh_isstate(SH_HISTORY);
|
int was_history = sh_isstate(SH_HISTORY);
|
||||||
int was_verbose = sh_isstate(SH_VERBOSE);
|
int was_verbose = sh_isstate(SH_VERBOSE);
|
||||||
int was_interactive = sh_isstate(SH_INTERACTIVE);
|
int was_interactive = sh_isstate(SH_INTERACTIVE);
|
||||||
@@ -2209,17 +2215,34 @@ static void comsubst(Mac_t *mp,register
|
@@ -2127,7 +2133,7 @@ static void comsubst(Mac_t *mp,register
|
||||||
|
num = lseek(fd, (off_t)0, SEEK_CUR);
|
||||||
|
goto out_offset;
|
||||||
|
}
|
||||||
|
- if(!(sp=mp->shp->sftable[fd]))
|
||||||
|
+ if(!(sp=mp->shp->sftable[fd]) || (sffileno(sp)!=fd &&!(sfset(sp,0,0)&SF_STRING)))
|
||||||
|
sp = sfnew(NIL(Sfio_t*),(char*)malloc(IOBSIZE+1),IOBSIZE,fd,SF_READ|SF_MALLOC);
|
||||||
|
type = 3;
|
||||||
|
}
|
||||||
|
@@ -2209,17 +2215,36 @@ static void comsubst(Mac_t *mp,register
|
||||||
}
|
}
|
||||||
else if(lastc)
|
else if(lastc)
|
||||||
{
|
{
|
||||||
@ -159,7 +168,8 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
- ssize_t len = 1;
|
- ssize_t len = 1;
|
||||||
-
|
+ len = 1;
|
||||||
|
|
||||||
/* can't write past buffer so save last character */
|
/* can't write past buffer so save last character */
|
||||||
+#if SHOPT_MULTIBYTE
|
+#if SHOPT_MULTIBYTE
|
||||||
+ if ((lc->flags & LC_utf8)==0 && (len = mbsize(str))>1)
|
+ if ((lc->flags & LC_utf8)==0 && (len = mbsize(str))>1)
|
||||||
@ -175,7 +185,7 @@
|
|||||||
c -= len;
|
c -= len;
|
||||||
lastc = str[c];
|
lastc = str[c];
|
||||||
str[c] = 0;
|
str[c] = 0;
|
||||||
@@ -2240,8 +2263,16 @@ static void comsubst(Mac_t *mp,register
|
@@ -2240,8 +2265,16 @@ static void comsubst(Mac_t *mp,register
|
||||||
}
|
}
|
||||||
if(lastc)
|
if(lastc)
|
||||||
{
|
{
|
||||||
@ -193,7 +203,7 @@
|
|||||||
}
|
}
|
||||||
sfclose(sp);
|
sfclose(sp);
|
||||||
return;
|
return;
|
||||||
@@ -2340,13 +2371,13 @@ static void mac_copy(register Mac_t *mp,
|
@@ -2340,13 +2373,13 @@ static void mac_copy(register Mac_t *mp,
|
||||||
if(mp->pattern)
|
if(mp->pattern)
|
||||||
{
|
{
|
||||||
char *sp = "&|()";
|
char *sp = "&|()";
|
||||||
|
37
ksh93-typedef.dif
Normal file
37
ksh93-typedef.dif
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
--- src/cmd/ksh93/bltins/typeset.c
|
||||||
|
+++ src/cmd/ksh93/bltins/typeset.c 2013-03-19 17:21:08.667413362 +0100
|
||||||
|
@@ -461,6 +461,7 @@ static void print_value(Sfio_t *iop, Nam
|
||||||
|
{
|
||||||
|
char *name;
|
||||||
|
int aflag=tp->aflag;
|
||||||
|
+ Namval_t *table;
|
||||||
|
if(nv_isnull(np))
|
||||||
|
{
|
||||||
|
if(!np->nvflag)
|
||||||
|
@@ -504,7 +505,9 @@ static void print_value(Sfio_t *iop, Nam
|
||||||
|
sfwrite(iop,"}\n",2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+ table = tp->sh->last_table;
|
||||||
|
sfputr(iop,nv_name(np),aflag=='+'?'\n':'=');
|
||||||
|
+ tp->sh->last_table = table;
|
||||||
|
if(aflag=='+')
|
||||||
|
return;
|
||||||
|
if(nv_isarray(np) && nv_arrayptr(np))
|
||||||
|
@@ -675,6 +678,7 @@ static int setall(char **argv,regist
|
||||||
|
{
|
||||||
|
if(comvar || (shp->last_root==shp->var_tree && (tp->tp || (!shp->st.real_fun && (nvflags&NV_STATIC)) || (!(flag&(NV_EXPORT|NV_RDONLY)) && nv_isattr(np,(NV_EXPORT|NV_IMPORT))==(NV_EXPORT|NV_IMPORT)))))
|
||||||
|
{
|
||||||
|
+ if((flag&(NV_HOST|NV_INTEGER))!=NV_HOST)
|
||||||
|
_nv_unset(np,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -790,7 +794,7 @@ static int setall(char **argv,regist
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *oldname=0;
|
||||||
|
- int len=strlen(name);
|
||||||
|
+ size_t len=strlen(name);
|
||||||
|
if(tp->argnum==1 && newflag==NV_INTEGER && nv_isattr(np,NV_INTEGER))
|
||||||
|
tp->argnum = 10;
|
||||||
|
if(np->nvfun && !nv_isarray(np) && name[len-1]=='.')
|
Loading…
x
Reference in New Issue
Block a user