Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio apply an 11 years old fix from FreeBSD:
details: https://anonhg.NetBSD.org/src/rev/fd15c61de995
branches: trunk
changeset: 757663:fd15c61de995
user: drochner <drochner%NetBSD.org@localhost>
date: Fri Sep 10 10:29:23 2010 +0000
description:
apply an 11 years old fix from FreeBSD:
if EBADF is returned due to a read from a write-only stream, also
set ferror()
found by a selftest of Python-2.6.6, thanks to obache for pointing
out the details
diffstat:
lib/libc/stdio/refill.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 329d7da6e210 -r fd15c61de995 lib/libc/stdio/refill.c
--- a/lib/libc/stdio/refill.c Fri Sep 10 10:23:46 2010 +0000
+++ b/lib/libc/stdio/refill.c Fri Sep 10 10:29:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refill.c,v 1.13 2003/08/07 16:43:30 agc Exp $ */
+/* $NetBSD: refill.c,v 1.14 2010/09/10 10:29:23 drochner Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)refill.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: refill.c,v 1.13 2003/08/07 16:43:30 agc Exp $");
+__RCSID("$NetBSD: refill.c,v 1.14 2010/09/10 10:29:23 drochner Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -91,6 +91,7 @@
if ((fp->_flags & __SRD) == 0) {
if ((fp->_flags & __SRW) == 0) {
errno = EBADF;
+ fp->_flags |= __SERR;
return (EOF);
}
/* switch to reading */
Home |
Main Index |
Thread Index |
Old Index