aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/busybox-1.23.0-ash.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-01-15 08:10:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-01-15 08:12:12 +0000
commitd61c73c912a0e51f738a31a6478e2aa8faf4d35d (patch)
tree067846ab0acc32576c5bd75849755dfd089f2546 /main/busybox/busybox-1.23.0-ash.patch
parent988241da2f95e5329dff5ca9c62e90cd1e513c32 (diff)
downloadaports-d61c73c912a0e51f738a31a6478e2aa8faf4d35d.tar.bz2
aports-d61c73c912a0e51f738a31a6478e2aa8faf4d35d.tar.xz
main/busybox: replace with add patches from upstream
Diffstat (limited to 'main/busybox/busybox-1.23.0-ash.patch')
-rw-r--r--main/busybox/busybox-1.23.0-ash.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/busybox/busybox-1.23.0-ash.patch b/main/busybox/busybox-1.23.0-ash.patch
new file mode 100644
index 0000000000..fb494aa251
--- /dev/null
+++ b/main/busybox/busybox-1.23.0-ash.patch
@@ -0,0 +1,34 @@
+--- busybox-1.23.0/shell/ash.c
++++ busybox-1.23.0-ash/shell/ash.c
+@@ -6746,6 +6746,14 @@ varvalue(char *name, int varflags, int f
+ len = strlen(p);
+ if (!(subtype == VSPLUS || subtype == VSLENGTH))
+ memtodest(p, len, syntax, quotes);
++#if ENABLE_UNICODE_SUPPORT
++ if (subtype == VSLENGTH && len > 0) {
++ reinit_unicode_for_ash();
++ if (unicode_status == UNICODE_ON) {
++ len = unicode_strlen(p);
++ }
++ }
++#endif
+ return len;
+ }
+
+@@ -6829,15 +6837,7 @@ evalvar(char *p, int flags, struct strli
+ varunset(p, var, 0, 0);
+
+ if (subtype == VSLENGTH) {
+- ssize_t n = varlen;
+- if (n > 0) {
+- reinit_unicode_for_ash();
+- if (unicode_status == UNICODE_ON) {
+- const char *val = lookupvar(var);
+- n = unicode_strlen(val);
+- }
+- }
+- cvtnum(n > 0 ? n : 0);
++ cvtnum(varlen > 0 ? varlen : 0);
+ goto record;
+ }
+