.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=151
This commit is contained in:
parent
75ee2a6ace
commit
7d6eba8317
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 19 15:14:00 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
- Make Shift_JIS patch more reliable as requestef from upstream
|
||||||
|
- Drop remaining part of the patch ksh93-zerofill.dif for zerofilled
|
||||||
|
variables (bnc#785360 as the first part of the patch is upstream
|
||||||
|
together with an other change. This fix a side effect of cutting
|
||||||
|
variables if TMOUT is used (bnc#808956)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 28 13:10:09 UTC 2013 - werner@suse.de
|
Thu Feb 28 13:10:09 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
5
ksh.spec
5
ksh.spec
@ -114,8 +114,6 @@ 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-zerofill.dif [bnc#785360]
|
|
||||||
Patch29: ksh93-zerofill.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
|
||||||
@ -206,7 +204,6 @@ fi
|
|||||||
%patch24
|
%patch24
|
||||||
%patch27
|
%patch27
|
||||||
%patch28
|
%patch28
|
||||||
%patch29
|
|
||||||
%patch30
|
%patch30
|
||||||
%patch31
|
%patch31
|
||||||
%patch32
|
%patch32
|
||||||
@ -389,7 +386,7 @@ fi
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
MEMORY="-s 128 ${MEMORY:+-e ${MEMORY}}"
|
MEMORY="-s 128 ${MEMORY:+-e ${MEMORY}}"
|
||||||
RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/[[:blank:]]+-g[0-9]?/ -g2/g')
|
RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/([[:blank:]]+)-g[[:digit:]]+/\1-g2/g;s/([[:blank:]]+)-g([[:blank:]]+|$)/\1-g2\2/g')
|
||||||
UNIVERSE=att
|
UNIVERSE=att
|
||||||
LDFLAGS="-lm"
|
LDFLAGS="-lm"
|
||||||
LDSOFLG=""
|
LDSOFLG=""
|
||||||
|
@ -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-02-07 13:26:07.897952986 +0000
|
+++ src/cmd/ksh93/sh/macro.c 2013-03-19 13:31:04.604732787 +0100
|
||||||
@@ -54,6 +54,7 @@
|
@@ -54,6 +54,7 @@
|
||||||
#if SHOPT_MULTIBYTE
|
#if SHOPT_MULTIBYTE
|
||||||
# undef isascii
|
# undef isascii
|
||||||
@ -125,7 +125,7 @@
|
|||||||
#else
|
#else
|
||||||
# define mbchar(p) (*(unsigned char*)p++)
|
# define mbchar(p) (*(unsigned char*)p++)
|
||||||
#endif /* SHOPT_MULTIBYTE */
|
#endif /* SHOPT_MULTIBYTE */
|
||||||
@@ -2026,6 +2027,10 @@ static void comsubst(Mac_t *mp,register
|
@@ -2026,6 +2027,11 @@ static void comsubst(Mac_t *mp,register
|
||||||
struct _mac_ savemac;
|
struct _mac_ savemac;
|
||||||
int savtop = stktell(stkp);
|
int savtop = stktell(stkp);
|
||||||
char lastc=0, *savptr = stkfreeze(stkp,0);
|
char lastc=0, *savptr = stkfreeze(stkp,0);
|
||||||
@ -133,33 +133,36 @@
|
|||||||
+ const Lc_t *lc=lcinfo(LC_CTYPE)->lc;
|
+ const Lc_t *lc=lcinfo(LC_CTYPE)->lc;
|
||||||
+ wchar_t lastw=0;
|
+ wchar_t lastw=0;
|
||||||
+#endif /* SHOPT_MULTIBYTE */
|
+#endif /* SHOPT_MULTIBYTE */
|
||||||
|
+ ssize_t len;
|
||||||
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,6 +2214,17 @@ static void comsubst(Mac_t *mp,register
|
@@ -2209,17 +2215,34 @@ static void comsubst(Mac_t *mp,register
|
||||||
}
|
}
|
||||||
else if(lastc)
|
else if(lastc)
|
||||||
{
|
{
|
||||||
|
- mac_copy(mp,&lastc,1);
|
||||||
|
+ char mb[8];
|
||||||
|
+ mb[0] = lastc;
|
||||||
|
+ len = 1;
|
||||||
+#if SHOPT_MULTIBYTE
|
+#if SHOPT_MULTIBYTE
|
||||||
+ if(lastw)
|
+ if(lastw)
|
||||||
+ {
|
+ len = mbconv(mb, lastw);
|
||||||
+ int n;
|
+ lastw = 0;
|
||||||
+ char mb[8];
|
|
||||||
+ n = mbconv(mb, lastw);
|
|
||||||
+ mac_copy(mp,mb,n);
|
|
||||||
+ lastw = 0;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+#endif /* SHOPT_MULTIBYTE */
|
+#endif /* SHOPT_MULTIBYTE */
|
||||||
mac_copy(mp,&lastc,1);
|
|
||||||
lastc = 0;
|
lastc = 0;
|
||||||
|
+ mac_copy(mp,mb,len);
|
||||||
}
|
}
|
||||||
@@ -2220,6 +2236,17 @@ static void comsubst(Mac_t *mp,register
|
newlines = nextnewlines;
|
||||||
ssize_t len = 1;
|
if(++c < bufsize)
|
||||||
|
str[c] = 0;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- ssize_t 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 ((len = mbsize(str))>1 && !(lc->flags & LC_utf8))
|
+ if ((lc->flags & LC_utf8)==0 && (len = mbsize(str))>1)
|
||||||
+ {
|
+ {
|
||||||
+ len = mb2wc(lastw,str,len);
|
+ len = mb2wc(lastw,str,len);
|
||||||
+ if (len < 0)
|
+ if (len < 0)
|
||||||
@ -172,25 +175,25 @@
|
|||||||
c -= len;
|
c -= len;
|
||||||
lastc = str[c];
|
lastc = str[c];
|
||||||
str[c] = 0;
|
str[c] = 0;
|
||||||
@@ -2240,6 +2267,17 @@ static void comsubst(Mac_t *mp,register
|
@@ -2240,8 +2263,16 @@ static void comsubst(Mac_t *mp,register
|
||||||
}
|
}
|
||||||
if(lastc)
|
if(lastc)
|
||||||
{
|
{
|
||||||
|
- mac_copy(mp,&lastc,1);
|
||||||
|
+ char mb[8];
|
||||||
|
+ mb[0] = lastc;
|
||||||
|
+ len = 1;
|
||||||
+#if SHOPT_MULTIBYTE
|
+#if SHOPT_MULTIBYTE
|
||||||
+ if(lastw)
|
+ if(lastw)
|
||||||
+ {
|
+ len = mbconv(mb, lastw);
|
||||||
+ int n;
|
+ lastw = 0;
|
||||||
+ char mb[8];
|
|
||||||
+ n = mbconv(mb, lastw);
|
|
||||||
+ mac_copy(mp,mb,n);
|
|
||||||
+ lastw = 0;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+#endif /* SHOPT_MULTIBYTE */
|
+#endif /* SHOPT_MULTIBYTE */
|
||||||
mac_copy(mp,&lastc,1);
|
|
||||||
lastc = 0;
|
lastc = 0;
|
||||||
|
+ mac_copy(mp,mb,len);
|
||||||
}
|
}
|
||||||
@@ -2340,13 +2378,13 @@ static void mac_copy(register Mac_t *mp,
|
sfclose(sp);
|
||||||
|
return;
|
||||||
|
@@ -2340,13 +2371,13 @@ static void mac_copy(register Mac_t *mp,
|
||||||
if(mp->pattern)
|
if(mp->pattern)
|
||||||
{
|
{
|
||||||
char *sp = "&|()";
|
char *sp = "&|()";
|
||||||
@ -228,7 +231,7 @@
|
|||||||
int len;
|
int len;
|
||||||
--- src/cmd/ksh93/tests/sjis.sh
|
--- src/cmd/ksh93/tests/sjis.sh
|
||||||
+++ src/cmd/ksh93/tests/sjis.sh 2011-05-20 15:11:29.000000000 +0000
|
+++ src/cmd/ksh93/tests/sjis.sh 2011-05-20 15:11:29.000000000 +0000
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,77 @@
|
||||||
+########################################################################
|
+########################################################################
|
||||||
+# #
|
+# #
|
||||||
+# Copyright (c) 2007 SuSE Linux Products GmbH, Nuernberg, Germany #
|
+# Copyright (c) 2007 SuSE Linux Products GmbH, Nuernberg, Germany #
|
||||||
@ -295,6 +298,16 @@
|
|||||||
+ print -u2 -n "\t"
|
+ print -u2 -n "\t"
|
||||||
+ print -u2 -r ${0##*/}[$LINENO]: "Shift-JIS encoding failed"
|
+ print -u2 -r ${0##*/}[$LINENO]: "Shift-JIS encoding failed"
|
||||||
+fi
|
+fi
|
||||||
|
+
|
||||||
|
+LANG=POSIX
|
||||||
|
+typeset -r utf8_euro_char1=$'\u[20ac]'
|
||||||
|
+typeset -r utf8_euro_char2=$'\342\202\254'
|
||||||
|
+(( (${#utf8_euro_char1} == 1) && (${#utf8_euro_char2} == 1) )) || export LC_ALL='en_US.UTF-8'
|
||||||
|
+if [[ "$(printf '\u[20ac]')" != $'\342\202\254' ]] ; then
|
||||||
|
+ : err_exit
|
||||||
|
+ print -u2 -n "\t"
|
||||||
|
+ print -u2 -r ${0##*/}[$LINENO]: "Locale overrride failed."
|
||||||
|
+fi
|
||||||
+exit $err
|
+exit $err
|
||||||
--- src/lib/libast/comp/setlocale.c
|
--- src/lib/libast/comp/setlocale.c
|
||||||
+++ src/lib/libast/comp/setlocale.c 2007-12-20 17:50:28.000000000 +0000
|
+++ src/lib/libast/comp/setlocale.c 2007-12-20 17:50:28.000000000 +0000
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
--- src/cmd/ksh93/bltins/typeset.c
|
|
||||||
+++ src/cmd/ksh93/bltins/typeset.c 2012-10-19 14:56:49.000000000 +0000
|
|
||||||
@@ -756,6 +756,7 @@ static int setall(char **argv,regist
|
|
||||||
}
|
|
||||||
if (tp->aflag == '-')
|
|
||||||
{
|
|
||||||
+ int oldnum;
|
|
||||||
if((flag&NV_EXPORT) && (strchr(name,'.') || nv_isvtree(np)))
|
|
||||||
errormsg(SH_DICT,ERROR_exit(1),e_badexport,name);
|
|
||||||
#if SHOPT_BSH
|
|
||||||
@@ -774,6 +775,9 @@ static int setall(char **argv,regist
|
|
||||||
else if(!(flag&NV_LJUST))
|
|
||||||
newflag &= ~NV_LJUST;
|
|
||||||
}
|
|
||||||
+ oldnum = nv_size(np);
|
|
||||||
+ if (oldnum > 0)
|
|
||||||
+ tp->argnum = oldnum;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
Loading…
x
Reference in New Issue
Block a user