[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] [configure] test for diff/diff3
From: |
Tom Lord |
Subject: |
Re: [Gnu-arch-users] [configure] test for diff/diff3 |
Date: |
Mon, 15 Dec 2003 08:57:16 -0800 (PST) |
> From: Ollivier Robert <address@hidden>
> I'm having problems with patch-286 on MacOS X (10.3.1). The
> configure test finds that my diff/diff3 have troubles handling
> EOL but they have been working perfectly since the beginning
> with tla so I'm a bit worried about the test.
> MacOS X:
> 330 [10:43] address@hidden:/tmp> diff -u ,,tmp/nl_eof_a ,,tmp/nl_eof_b
2>/dev/null | grep '^\\ No newline'
> 331 [10:44] address@hidden:/tmp> echo $?
> 1
There are two ways you might notice the problem with your diff/patch combo:
a) if they don't actually handle non-newline-terminated files
correctly
You'll only notice if you actually create such a file in your
source tree.
b) if they _do_ actually handle non-newline-terminated files
correctly -- but in a way different from the diff/patch combos
on other systems
I hear rumors that some BSD flavors have this problem. You
can be bitten by it if (1) you have some non-newline-terminated
files in your tree (2) you try to use your archive on some other
system where diff/patch behave more conventionally
Those two ways to be bitten leave lots and lots of room for operating
just fine without ever having a problem. Nevertheless, you really
should be using a diff (at least in tla) that generates portable
patches.
So my first guess is that, in fact, the config script is correct.
This, however, confuses me:
> Interestingly, my FreeBSD 4.8 which is supposed to have a bad diff/diff3
> fails with both the standard diff and a pristine GNU diff.
> 243 [10:52] address@hidden:src/=build> CFLAGS="-O -pipe" ../configure
> --prefix /usr/local --with-gnu-diff gdiff --with-gnu-diff3 gdiff3
> The configured versions of diff and diff3 do not handle files
> not ending in newline correctly.
> configured diff = gdiff.
> configured diff3 = gdiff3.
> Use config options
> --gnu-diff
> --gnu-diff3
> I suspect the nonl-safe-diff script isn't doing his job properly.
What _version_ of Gnu diff are you using? If it is an old version,
please try a more recent one.
-t