aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/busybox/busybox-1.9.2/sort-z-nul.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/busybox/busybox-1.9.2/sort-z-nul.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/busybox/busybox-1.9.2/sort-z-nul.patch')
-rw-r--r--recipes/busybox/busybox-1.9.2/sort-z-nul.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes/busybox/busybox-1.9.2/sort-z-nul.patch b/recipes/busybox/busybox-1.9.2/sort-z-nul.patch
new file mode 100644
index 0000000000..55452a4524
--- /dev/null
+++ b/recipes/busybox/busybox-1.9.2/sort-z-nul.patch
@@ -0,0 +1,50 @@
+Summary: 0001591: inconsistent behavior of sort -z
+
+URL: http://busybox.net/bugs/view.php?id=1591
+http://www.busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/coreutils/sort.c?rev=21004&r1=20435&r2=21004&makepatch=1&diff_format=u
+
+Description:
+
+busybox sort -z does:
+use NUL instead of EOL on input
+
+GNU sort -z does:
+use NUL instead of EOL on input and output
+
+GNU sort -z documents:
+use NUL instead of EOL on input
+
+Additional Information:
+
+Note that sort -z is not part of any standard. But several applications
+(e. g. GNU findutils updatedb) depends on the NUL-on-output behavior.
+
+GNU sort documentation bug was reported to coreutils maintainers.
+
+Notes:
+
+vda 02-13-08 06:30 (0004364)
+Fixed in revision 21004. Thanks!
+
+--- busybox/coreutils/sort.c 2007/11/16 12:39:16 20435
++++ busybox/coreutils/sort.c 2008/02/13 14:30:33 21004
+@@ -32,7 +32,7 @@
+ FLAG_u = 8, /* Unique */
+ FLAG_c = 0x10, /* Check: no output, exit(!ordered) */
+ FLAG_s = 0x20, /* Stable sort, no ascii fallback at end */
+- FLAG_z = 0x40, /* Input is null terminated, not \n */
++ FLAG_z = 0x40, /* Input and output is NUL terminated, not \n */
+ /* These can be applied to search keys, the previous four can't */
+ FLAG_b = 0x80, /* Ignore leading blanks */
+ FLAG_r = 0x100, /* Reverse */
+@@ -396,8 +396,9 @@
+ if (linecount) linecount = flag+1;
+ }
+ /* Print it */
++ flag = (option_mask32 & FLAG_z) ? '\0' : '\n';
+ for (i = 0; i < linecount; i++)
+- fprintf(outfile, "%s\n", lines[i]);
++ fprintf(outfile, "%s%c", lines[i], flag);
+
+ fflush_stdout_and_exit(EXIT_SUCCESS);
+ }