Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Larry Jones
Thu, 19 Nov 1992 07:55
Patch bug
Author: Larry Jones
Date: Thu, 19 Nov 1992 07:55
Date: Thu, 19 Nov 1992 07:55
40 lines
2130 bytes
2130 bytes
Patch has a problem patching a read-only file with a 14
character name on a file system that only supports 14 character
names. Since the file is read-only, patch tries to find an RCS
or SCCS file to check out. Unfortunately, the generated RCS
file name, when truncated to 14 characters, is the same as the
original file name so patch thinks it has found an RCS file and
tries to do RCS stuff which then fails. The following diff
(against the 12u8 version) fixes this problem by checking that
the RCS file is not the same as the original file before trying
to process it.
*** inp.c.old Thu Nov 19 12:04:18 1992
--- inp.c Thu Nov 19 12:06:02 1992
***************
*** 109,117 ****
strncpy(s, filename, pathlen);
#define try(f, a1, a2) (Sprintf(s + pathlen, f, a1, a2), stat(s, &cstat) == 0)
! if ( try("RCS/%s%s", filebase, RCSSUFFIX)
! || try("RCS/%s" , filebase, 0)
! || try( "%s%s", filebase, RCSSUFFIX)) {
Sprintf(buf, CHECKOUT, filename);
Sprintf(lbuf, RCSDIFF, filename);
cs = "RCS";
--- 109,119 ----
strncpy(s, filename, pathlen);
#define try(f, a1, a2) (Sprintf(s + pathlen, f, a1, a2), stat(s, &cstat) == 0)
! if (( try("RCS/%s%s", filebase, RCSSUFFIX)
! || try("RCS/%s" , filebase, 0)
! || try( "%s%s", filebase, RCSSUFFIX)) &&
! ( filestat.st_dev != cstat.st_dev
! || filestat.st_ino != cstat.st_ino)) {
Sprintf(buf, CHECKOUT, filename);
Sprintf(lbuf, RCSDIFF, filename);
cs = "RCS";
----
Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
larry.jones@sdrc.com or ...uunet!sdrc!larry.jones
Hmm... That might not be politic. -- Calvin
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