All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit master 1/1] busybox: 1.18.2 fix for wc
@ 2011-01-24 16:04 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2011-01-24 16:04 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=87cb38b9286f1eca230e77715d7d8fca8289358e
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 .../busybox/busybox-1.18.2/busybox-1.18.2-wc.patch |   41 ++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 package/busybox/busybox-1.18.2/busybox-1.18.2-wc.patch

diff --git a/package/busybox/busybox-1.18.2/busybox-1.18.2-wc.patch b/package/busybox/busybox-1.18.2/busybox-1.18.2-wc.patch
new file mode 100644
index 0000000..558896d
--- /dev/null
+++ b/package/busybox/busybox-1.18.2/busybox-1.18.2-wc.patch
@@ -0,0 +1,41 @@
+--- busybox-1.18.2/coreutils/wc.c
++++ busybox-1.18.2-wc/coreutils/wc.c
+@@ -81,11 +81,11 @@
+  * column order in "wc -cmlwL" output:
+  */
+ enum {
+-	WC_LINES    = 0,
+-	WC_WORDS    = 1,
+-	WC_UNICHARS = 2,
+-	WC_CHARS    = 3,
+-	WC_LENGTH   = 4,
++	WC_LINES    = 0, /* -l */
++	WC_WORDS    = 1, /* -w */
++	WC_UNICHARS = 2, /* -m */
++	WC_BYTES    = 3, /* -c */
++	WC_LENGTH   = 4, /* -L */
+ 	NUM_WCS     = 5,
+ };
+ 
+@@ -104,10 +104,10 @@ int wc_main(int argc UNUSED_PARAM, char 
+ 
+ 	init_unicode();
+ 
+-	print_type = getopt32(argv, "lwcmL");
++	print_type = getopt32(argv, "lwmcL");
+ 
+ 	if (print_type == 0) {
+-		print_type = (1 << WC_LINES) | (1 << WC_WORDS) | (1 << WC_CHARS);
++		print_type = (1 << WC_LINES) | (1 << WC_WORDS) | (1 << WC_BYTES);
+ 	}
+ 
+ 	argv += optind;
+@@ -157,7 +157,7 @@ int wc_main(int argc UNUSED_PARAM, char 
+ 			}
+ 
+ 			/* Cater for -c and -m */
+-			++counts[WC_CHARS];
++			++counts[WC_BYTES];
+ 			if (unicode_status != UNICODE_ON /* every byte is a new char */
+ 			 || (c & 0xc0) != 0x80 /* it isn't a 2nd+ byte of a Unicode char */
+ 			) {
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-24 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 16:04 [Buildroot] [git commit master 1/1] busybox: 1.18.2 fix for wc Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.