Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Brian Matthews
Tue, 11 Apr 1989 17:23
2 diff bugs, 1 (trivial) fix
Author: Brian Matthews
Date: Tue, 11 Apr 1989 17:23
Date: Tue, 11 Apr 1989 17:23
46 lines
1621 bytes
1621 bytes
I've compiled the latest gnu diff from osu-cis (version 1.4, as of 26 Oct
1988), and found a couple of problems. I compiled it with gcc 1.34 on a
System V Release 3 machine.
First, in diff3.c on line 112, there is an #ifdef _GNUCC, which needs to
be #ifdef __GNUC__ (for 1.34 gcc at least). Although it hardly seems
worth it, a context diff is attached below.
Secondly, when a blank line is added at the beginning and end of a file,
a normal diff misses the one added at the end. So, you get something
like the following:
$ echo 'Hello, earth' >file1
$ echo '\nHello, earth\n' >file2
$ ./diff file1 file2
0a1
>
$
A diff -c works as expected. Has anyone else seen this? Anyone fixed
it?
As promised, the context diff for diff3.c:
*** orig/diff3.c Mon Apr 10 14:41:11 1989
--- diff3.c Mon Apr 10 14:41:24 1989
***************
*** 109,115 ****
#include <ctype.h>
#include "diff.h"
! #ifdef _GNUCC
#define alloca __builtin_alloca
#endif
--- 109,115 ----
#include <ctype.h>
#include "diff.h"
! #ifdef __GNUC__
#define alloca __builtin_alloca
#endif
--
Brian L. Matthews blm@cxsea.UUCP ...{mnetor,uw-beaver!ssc-vax}!cxsea!blm
+1 206 251 6098 Computer X Inc. - a division of Motorola New Enterprises
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