Files
oldlinux-files/Linux-0.12/patchs/lib.patch
2024-02-19 00:21:02 -05:00

64 lines
1.9 KiB
Diff

Date: Thu, 16 Jan 92 10:54:37 EST
From: "Derek Lieber" <derek@watson.ibm.com>
To: Linux-activists@joker.cs.hut.fi
Subject: uncompress and estdio
Attached below is a patch to estdio that was posted to comp.os.minix
awhile back. Last time I looked, the linux version of estdio did *NOT*
have these patches applied. Maybe that's what causes the uncompress
problem?
Derek Lieber
derek@watson.ibm.com
-----------------------------------attachment--------------------------------
Newsgroups: comp.os.minix
Path: arnor!bywater!uunet!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!fauern!NewsServ!rommel
From: rommel@Informatik.TU-Muenchen.DE (Kai Uwe Rommel)
Subject: Yet another bug in estdio (fread.c)
Message-ID: <1991Oct3.111254.23702@Informatik.TU-Muenchen.DE>
Sender: news@Informatik.TU-Muenchen.DE (News System)
Organization: Technische Universitaet Muenchen, Germany
Date: Thu, 3 Oct 1991 11:12:54 GMT
Lines: 38
I noticed another bug in estdio/fread.c. It does not set the _IOEOF flag
when hitting EOF during an __ioread() call.
The diff below fixes it and included the previously known bug with
readsize. I don't know if this fix catches all situations, it works for
me.
*** fread.c~ Tue Oct 30 05:33:23 1990
--- fread.c Thu Oct 3 11:17:50 1991
***************
*** 66,71 ****
--- 66,72 ----
MEMCPY(p, q, (size_t) readsize);
p += readsize;
q += readsize;
+ readsize = 0;
}
else {
do
***************
*** 105,110 ****
--- 106,114 ----
reed != 0 && (red = __ioread(fileno(fp), (char *) p, reed)) != 0;
p += red, reed -= red)
;
+
+ if (red == 0)
+ SETFLAG(fp, _IOEOF);
if (reed != 0) {
if ((readsize -= reed) >= leftover) {
Kai Uwe Rommel
/* Kai Uwe Rommel, Munich ----- rommel@informatik.tu-muenchen.de */
DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be. -Russell Williams