aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox
diff options
context:
space:
mode:
authorAndy Boyett <agb@openwrt.org>2008-08-28 16:40:53 +0000
committerAndy Boyett <agb@openwrt.org>2008-08-28 16:40:53 +0000
commita8db2ca66884196795d05b7e9b01d204d4826ff3 (patch)
tree5643d1f67f7d9f2c9188963eff1c39de44a5e200 /package/busybox
parent18a6db118c65dc4058886608f42f0a68b510ea85 (diff)
downloadupstream-a8db2ca66884196795d05b7e9b01d204d4826ff3.tar.gz
upstream-a8db2ca66884196795d05b7e9b01d204d4826ff3.tar.bz2
upstream-a8db2ca66884196795d05b7e9b01d204d4826ff3.zip
[busybox] Use unsigned longs for bitwise operations in awk, thanks benoar.
- Resolves the ipcalc.sh bug on some arches, closes #3012, #3946 - Submitted upstream as busybox bug #4774 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12427 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox')
-rw-r--r--package/busybox/patches/530-unsigned_bitwise_ops.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/busybox/patches/530-unsigned_bitwise_ops.patch b/package/busybox/patches/530-unsigned_bitwise_ops.patch
new file mode 100644
index 0000000000..3226892b8a
--- /dev/null
+++ b/package/busybox/patches/530-unsigned_bitwise_ops.patch
@@ -0,0 +1,36 @@
+--- a/editors/awk.c
++++ b/editors/awk.c
+@@ -2046,27 +2046,27 @@
+ break;
+
+ case B_an:
+- setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) & (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_co:
+- setvar_i(res, ~(long)getvar_i(av[0]));
++ setvar_i(res, ~(unsigned long)getvar_i(av[0]));
+ break;
+
+ case B_ls:
+- setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) << (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_or:
+- setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) | (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_rs:
+- setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1])));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_xo:
+- setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) ^ (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_lo: