r2406 - in glibc-package/trunk/debian: . patches patches/any
Author: schizo
Date: 2007-07-09 09:56:14 +0000 (Mon, 09 Jul 2007)
New Revision: 2406
Added:
glibc-package/trunk/debian/patches/any/cvs-vfscanf.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* Add any/cvs-vfscanf.diff: add additional test for EOF
in loop to look for conversion specifier to avoid testing of
wrong errno value.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2007-07-09 09:53:27 UTC (rev 2405)
+++ glibc-package/trunk/debian/changelog 2007-07-09 09:56:14 UTC (rev 2406)
@@ -1,6 +1,9 @@
glibc (2.6-2) UNRELEASED; urgency=low
* Add any/cvs-nis-nss-default.diff: preserve errno.
+ * Add any/cvs-vfscanf.diff: add additional test for EOF
+ in loop to look for conversion specifier to avoid testing of
+ wrong errno value.
-- Clint Adams <schizo@debian.org> Mon, 09 Jul 2007 05:50:14 -0400
Added: glibc-package/trunk/debian/patches/any/cvs-vfscanf.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-vfscanf.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-vfscanf.diff 2007-07-09 09:56:14 UTC (rev 2406)
@@ -0,0 +1,28 @@
+===================================================================
+RCS file: /cvs/glibc/libc/stdio-common/vfscanf.c,v
+retrieving revision 1.110.2.6
+retrieving revision 1.110.2.7
+diff -u -r1.110.2.6 -r1.110.2.7
+--- libc/stdio-common/vfscanf.c 2007/05/04 10:05:57 1.110.2.6
++++ libc/stdio-common/vfscanf.c 2007/07/08 10:08:25 1.110.2.7
+@@ -530,12 +530,17 @@
+ {
+ /* Eat whitespace. */
+ int save_errno = errno;
+- errno = 0;
++ __set_errno (0);
+ do
+- if (__builtin_expect (inchar () == EOF && errno == EINTR, 0))
++ /* We add the additional test for EOF here since otherwise
++ inchar will restore the old errno value which might be
++ EINTR but does not indicate an interrupt since nothing
++ was read at this time. */
++ if (__builtin_expect ((c == EOF || inchar () == EOF)
++ && errno == EINTR, 0))
+ input_error ();
+ while (ISSPACE (c));
+- errno = save_errno;
++ __set_errno (save_errno);
+ ungetc (c, s);
+ skip_space = 0;
+ }
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2007-07-09 09:53:27 UTC (rev 2405)
+++ glibc-package/trunk/debian/patches/series 2007-07-09 09:56:14 UTC (rev 2406)
@@ -95,6 +95,7 @@
any/cvs-malloc.diff
any/cvs-nscd-short-replies.diff
any/cvs-nis-nss-default.diff
+any/cvs-vfscanf.diff
any/local-notls.diff -p0
any/local-asserth-decls.diff -p0
# any/local-base.diff -p0 # g: suspended
Reply to: