Ted Unangst wrote:
> Todd C. Miller wrote:
> > On Wed, 12 Dec 2018 13:08:07 -0500, "Ted Unangst" wrote:
> >
> > > i don't want to go too far down the legacy rabbit hole, just float nicely
> > > above it.
> >
> > Which is exactly how we got to this point. What else is missing
> > and how many years will it take before someone notices? Is it
> > really safe to completely ignore the stdio flags?
>
> One missed feature every five years doesn't sound all that bad. :)
>
> But sure, if we want to revert and regress before putting it back, ok.
I went with a simpler #if 0 approach because I think it will make it easier to
track the fixes.
ok?
Index: fread.c
===================================================================
RCS file: /cvs/src/lib/libc/stdio/fread.c,v
retrieving revision 1.15
diff -u -p -r1.15 fread.c
--- fread.c 21 Sep 2016 04:38:56 -0000 1.15
+++ fread.c 12 Dec 2018 18:50:03 -0000
@@ -69,6 +69,7 @@ fread(void *buf, size_t size, size_t cou
total = resid;
p = buf;
+#if 0
if ((fp->_flags & __SNBF) != 0) {
/*
* We know if we're unbuffered that our buffer is empty, so
@@ -82,6 +83,7 @@ fread(void *buf, size_t size, size_t cou
FUNLOCKFILE(fp);
return ((total - resid) / size);
}
+#endif
while (resid > (r = fp->_r)) {
(void)memcpy(p, fp->_p, r);