emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61193: closed ('-D' option of diff 3.9 - #ifdef directives missing)


From: GNU bug Tracking System
Subject: bug#61193: closed ('-D' option of diff 3.9 - #ifdef directives missing)
Date: Fri, 10 Feb 2023 23:49:02 +0000

Your message dated Fri, 10 Feb 2023 15:47:53 -0800
with message-id <1af2b347-5375-8cb3-edd8-a78da2239067@cs.ucla.edu>
and subject line Re: [bug-diffutils] bug#61193: '-D' option of diff 3.9 - 
#ifdef directives missing
has caused the debbugs.gnu.org bug report #61193,
regarding '-D' option of diff 3.9 - #ifdef directives missing
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61193: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61193
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: '-D' option of diff 3.9 - #ifdef directives missing Date: Mon, 30 Jan 2023 19:02:43 -0800
Hi,
The merged output from 'diff -D' (v3.9) is missing the '#ifdef'
directives.  A test script and logs from runs with two versions of diff,
one not working, and the second older one working, follows.

-------------------------------------------------------------------------
#!/bin/sh
# diff_ifdef_example.sh   2023-01-30   rw
#
# The -D option (--ifdef) of 'diff' version 3.9 does not work correctly.
# The '#ifdef' directives are not included in the merged output.

diff -v |grep diff
seq 5 > c
for OPT in '' '-D ZZZ' '-u'  ;do
  printf '\n=== diff %s\n' "$OPT"
  sed 2,3d c  |diff $OPT c -
  done

-------------------------------------------------------------------------
openSUSE Tumbleweed 20230129
diff (GNU diffutils) 3.9

=== diff
2,3d1
< 2
< 3

=== diff -D ZZZ
1
2
3
4
5

=== diff -u
--- c 2023-01-30 16:29:06.165608569 -0800
+++ - 2023-01-30 16:29:06.188398585 -0800
@@ -1,5 +1,3 @@
 1
-2
-3
 4
 5

-------------------------------------------------------------------------
openSUSE Tumbleweed 20220312
diff (GNU diffutils) 3.8

=== diff
2,3d1
< 2
< 3

=== diff -D ZZZ
1
#ifndef ZZZ
2
3
#endif /* ! ZZZ */
4
5

=== diff -u
--- c 2023-01-30 16:32:59.516569839 -0800
+++ - 2023-01-30 16:32:59.529462800 -0800
@@ -1,5 +1,3 @@
 1
-2
-3
 4
 5

--
Robert Webb

--- End Message ---
--- Begin Message --- Subject: Re: [bug-diffutils] bug#61193: '-D' option of diff 3.9 - #ifdef directives missing Date: Fri, 10 Feb 2023 15:47:53 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Thanks for the bug report and test case. This is due to a "sizeof sizeof" typo I introduced in diff 3.9; sorry about that. I installed the attached to fix things and add a regression test.

Attachment: 0001-diff-fix-bug-where-D-does-not-work.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]