From: Pádraig Brady
Date: Tue, 8 Dec 2015 15:30:56 +0000 (+0000) Subject: fix freadptr to work with ungetc on all uClibc configs X-Git-Tag: v1.0~6886 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b8d01591928acf7640dcb4c3652320a07c3c2ddb;p=gnulib.git fix freadptr to work with ungetc on all uClibc configs This was noticed at https://bugs.busybox.net/show_bug.cgi?id=4099 where GNU coreutils cut fails like: $echo '3:0:0:' | cut -d : -f 2 30 The reason is because GNU cut uses ungetc(), and that wasn't handled appropriately on uClibc when __UCLIBC_HAS_STDIO_GETC_MACRO__ is not defined. * lib/freadptr.c (freadptr): Return NULL if there are ungotten chars. In this case freadseek() will iterate again to process the ungotten character. --- diff --git a/ChangeLog b/ChangeLog index fffa98a306..13f49662b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2015-12-08 Pádraig Brady
+
+ fix freadptr to work with ungetc on all uClibc configs
+ Reported at https://bugs.busybox.net/show_bug.cgi?id=4099
+ where GNU coreutils cut(1) generates invalid output on uClibc
+ when __UCLIBC_HAS_STDIO_GETC_MACRO__ is not defined.
+ * lib/freadptr.c (freadptr): Return NULL if there are
+ ungotten chars. In this case freadseek() will iterate
+ again to process the ungotten character.
+
2015-11-13 Paul Eggert