Subject: re: toolchain/14432
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 10/09/2006 04:20:03
The following reply was made to PR toolchain/14432; it has been noted by GNATS.

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc: Mark Davies <mark@mcs.vuw.ac.nz>
Subject: re: toolchain/14432
Date: Mon, 09 Oct 2006 14:15:24 +1000

 this patch is probably pretty naive, but it does make the test at
 hand work...  the #if 0'ed comment is possibly quite leading about
 the cause of this and it seems this behaviour isn't exactly well
 specified among unixes?  (i couldn't easily find SuS to tell me
 what is the right answer...)
 
 
 .mrg.
 
 
 Index: refill.c
 ===================================================================
 RCS file: /cvsroot/src/lib/libc/stdio/refill.c,v
 retrieving revision 1.13
 diff -p -r1.13 refill.c
 *** refill.c	7 Aug 2003 16:43:30 -0000	1.13
 --- refill.c	9 Oct 2006 04:11:35 -0000
 *************** __srefill(fp)
 *** 83,91 ****
 --- 83,93 ----
   
   	fp->_r = 0;		/* largely a convenience for callers */
   
 + #if 0
   	/* SysV does not make this test; take it out for compatibility */
   	if (fp->_flags & __SEOF)
   		return (EOF);
 + #endif
   
   	/* if not already reading, have to be reading and writing */
   	if ((fp->_flags & __SRD) == 0) {