Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Joseph H Buehler
Sat, 12 Dec 1992 19:22
bug fix for find 3.7
Author: Joseph H Buehler
Date: Sat, 12 Dec 1992 19:22
Date: Sat, 12 Dec 1992 19:22
55 lines
2145 bytes
2145 bytes
I had been having problems with the "locate" part of GNU find 3.6 and
3.7, running under SVR4.0.3 on a 486 platform. It turned out to be a
bug in the putw() routine in the C library on this platform. The
following patches eliminate usage of this routine in locate/code.c and
locate/locate.c.
Joe Buehler
*** code.c.~1~ Tue Jul 14 01:14:28 1992
--- code.c Sat Dec 12 12:31:14 1992
***************
*** 115,122 ****
--- 115,131 ----
diffcount = count - oldcount;
if (diffcount < -14 || diffcount > 14)
{
+ #ifdef OLDSTUFF
putc (RESET, stdout);
putw (diffcount + 14, stdout);
+ #else
+ int tempint = diffcount + 14;
+ putc (RESET, stdout);
+ putc ((unsigned char)(tempint >> 0), stdout);
+ putc ((unsigned char)(tempint >> 8), stdout);
+ putc ((unsigned char)(tempint >> 16), stdout);
+ putc ((unsigned char)(tempint >> 24), stdout);
+ #endif
}
else
putc (diffcount + 14, stdout);
*** locate.c.~1~ Tue Jul 14 00:25:14 1992
--- locate.c Sat Dec 12 12:32:05 1992
***************
*** 111,117 ****
--- 111,130 ----
c = getc (fp);
while (c != EOF)
{
+ #ifdef OLDSTUFF
count += ((c == ESCCODE) ? getw (fp) : c) - OFFSET;
+ #else
+ if (c == ESCCODE) {
+ int tempint = 0;
+ tempint += ((unsigned int)(unsigned char) getc (fp)) << 0;
+ tempint += ((unsigned int)(unsigned char) getc (fp)) << 8;
+ tempint += ((unsigned int)(unsigned char) getc (fp)) << 16;
+ tempint += ((unsigned int)(unsigned char) getc (fp)) << 24;
+ count += tempint - OFFSET;
+ } else {
+ count += c - OFFSET;
+ }
+ #endif
for (p = path + count; (c = getc (fp)) > ESCCODE;)
/* Overlay old path. */
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads