delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/09/23/00:19:45

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 68N4JjU3882813
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 68N4JjU3882813
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=A7tTcuLr
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B3354BB24C8
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1790137167;
bh=bqgOSFzcubwc/J02/sz+J8LqDnhUHf/PSCTiSfJGD4k=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=A7tTcuLrLU2YNv1jfp6EpxI5cDFxrfVNIX8l8tazBzpRTJben0SsDhqjj/994eMXf
DCJ8HMGygWsrGXRRyO4kQVYTPNyznC843V3ZuTvLN4o8WgDk/7xDWGJcmzYj6havfq
f5y0P+EdCmQs4pFXnk3h6vBDBaj5n0eSk62/MlEs=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D17384BA2E3E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D17384BA2E3E
ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1790137119; cv=pass;
b=G0kOfBUy2FV8HnDfkLIZ8JXQnOM+bNBMbLhER+yBnZxJTMpha8BbysHQcaGSfJXhB0fsS5TyHr7ycNkHoipggVih4UNXQ+23+zHVuyEfk9nKLCfJ+qOCLHMyXVFjUCPG5Fxdcju3s/HvUHTE4rcz+aTkfk7BMRYR2m18wQpvrus=
ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key;
t=1790137119; c=relaxed/simple;
bh=Z0Td0LGhbG026OSeSudhkGpzYWyY9qChVX50grdBhkw=;
h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
b=mL6pk1X/htOCFGgybSZLEjHR5rZdt8oFlkgABMxvnKPEfWfFOIdOrL7B195le29V3ofewaxl+Sf+is6nkiE3niK6j0NsZze0JbgNJk/tDQcouQCS0AMOuRN2plYs1g6TDJTkkJU09lhiHZ5pQX88QtY8OrcHBkKkYqFGV3gUFMo=
ARC-Authentication-Results: i=2; sourceware.org;
dkim=pass (2048-bit key, unprotected)
header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104
header.b=h3XkI+oB
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D17384BA2E3E
ARC-Seal: i=1; a=rsa-sha256; t=1790137117; cv=none;
d=google.com; s=arc-20260327;
b=gD7uHpJLRDRyt0QWx/zhiqv2L7Xxl09PpcxNAUSohwibMGnmPBPZj8QU6tmLEOrKdj
0JXCnWNr1UFWVMxpKSJIcvLTXKdjChir9OjRaTMqeLdFh9PboODocpuDtZbkbb9jFtdz
HfFPpxnybReYS6Lyhnut4JOe22nw16KD6UPBsnowkBWcgazViy6x3yYgUpr5KhNeYjut
shHIvf+9J+he52m6lQc6r7WTDHJU9AUs/2IaCbGCeivjOEiAVhV3OwYKvN7Mlfaei5kj
YU2qTlr5nQXI94W2roze7B5WEZpMfGI7HixrEdRp8UW1CX1JRQ5KOu14XxAPPlH/00AV
SlXA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=to:subject:message-id:date:from:mime-version:dkim-signature;
bh=UlpwWmSIqAWB44xw6PuF9xOQUHOn4yUAUdibxj6op3I=;
fh=UKNFaOBO97U3RYl3PEse//nArTqr7SLJjCCEBz281Ew=;
b=VUoMM3saZ2AuPQpFLFD4b625+vkhvQISbNxhMIk7Bm69bM2EL9dcshmmUT6fHzOyqa
NAbZrBYgxD7ND1vGuJFz6e/hMhIV/akoZGajbeRKhq7lAq1MRxTYrPYdgVJ00Du6N69b
Nwg2oMgKCqovPeRzskNrj70/NmDQ5KDRKW2TU9ZhnWEES+ib87n6ApQF+fwkqjGGZtlb
n4/VnN6X8K9XXziw+a8dzNE5EuNi+iaWJjZn66Soet+/yksP09qC+N9CIVc05vuhCT2R
DpI6+uB1jd1m1/yEs+psNA1dfcciizwyuGsisQvvgM72U9ArOj88t6jf8Qm+o3sFecoh
FFMg==; darn=cygwin.com
ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1790137117; x=1790741917;
h=content-type:to:subject:message-id:date:from:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=UlpwWmSIqAWB44xw6PuF9xOQUHOn4yUAUdibxj6op3I=;
b=Gwa2t7Z2qnlZiJZwX8EOP5DqBYvYBD18DOHHM3nn9f5FaZYuEahY00MBTTP1odlPff
6XOs5UGFXmuZ5F1C/rudSpH+Ja3JdYCd7ihjGZyzQTBQz8/FwPFck0qs7QcQnsq9ui4P
/LDqQK0ApovRtgchaqMraUHMydT+286wsJvMhj/WoQYfYXG0YGTvvvbxZ4GfqDmjLKmm
xhLW8GNlPyVn0Jwwkz2zLt1Wk7QFSENcvHINXhHTHDlxsot0/JaS2USYOjUQS6+sXpEg
4kVoSeQT48b3ehmcozd409Q6l8hEg2aNVVX29Hto2ElYuxQTbb5inIUoeZnqkVw+tHb4
AIhQ==
X-Gm-Message-State: AFuF++k3CM9AE7OEg9gY6IdHzEKLMHwFqwSczAKFqjdnu/JpRSFCEbOe
3GpBaFHEDaTbMEyIdRyiaG4qlUh+XhUodgntqiasW6P76mX+dtlQalsshXKOCzwQU5KzPJpHmIZ
HT/nm4awOkpFkiViLtPZy9v93BUgw7+BW6Q==
X-Gm-Gg: AYBFou2am/ZsEm5WpZsid5+bvwwodTcEJWDcOzSAeiycPMPxWFPIz7BANoDQSjyafGb
rg7d4DDta1eTz8jDetu9f/eCbLGQWWYFCYPTSPQr/7qKwvseRZmTF9Nfkk2yWFdgYJ+dcRnXdzn
rOoKJiQEEbsibk0J1PGbwU1+Se8GNc41G2971QQvhpj5EOYZTzyJXgkkjV0T3hmJs0cPDWFKag5
lpGxW3uZjMQbyKJJXYkKtu6Vd8to6Pm6vd6/BNXGAtTD999nYsB1PbDnw8qvU8eM23in2pBmeFA
wTACHAAOfv1SxADawAhdoznE7CBzEWZBbAGpbQLAiYE1bYEEBT5BpGg=
X-Received: by 2002:a05:600c:8b64:b0:499:8b13:3a98 with SMTP id
5b1f17b1804b1-49fdee0a0ebmr12127735e9.4.1790137117108; Tue, 22 Sep 2026
21:18:37 -0700 (PDT)
MIME-Version: 1.0
Date: Wed, 23 Sep 2026 00:18:24 -0400
X-Gm-Features: AclHuK__2fldJZoqQS79Dj6hLzWP_XhqDLPnQXX_nY8no5tNC1NGEum2063DrAI
Message-ID: <CAMozKyt24TTHXz7SjX5qQQJjX1_gh7x+uRASvg6+ZzG2AsQ_=w@mail.gmail.com>
Subject: diffutils: -iBZ fails to ignore trailing ASCII spaces on Unix-encoded
files in Cygwin
To: cygwin AT cygwin DOT com
X-Content-Filtered-By: Mailman/MimeDel 2.1.30
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Bloodaxe via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Bloodaxe <bloodaxe AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

I have identified an issue in GNU diffutils 3.12 under Cygwin where
combining flags '-iBZ' (or running them separately as '-i -B -Z') fails to
ignore trailing standard ASCII spaces (0x20) on pure POSIX/Unix-encoded
files (0x0A line endings), whereas '-iBb' succeeds as expected.

Below is the output from a minimal reproduction script verifying the raw
byte layouts and flag behavior:

==================================================
1. ENVIRONMENT DETAILS
==================================================
CYGWIN_NT-10.0-19045 LOCAL-HOST 3.6.10-1.x86_64 2026-07-13 20:20 UTC x86_64
Cygwin
LANG: not set
diff (GNU diffutils) 3.12

==================================================
2. RAW BYTE HEX DUMPS
==================================================
FILE 1 (with trailing spaces):
0000000  20  20  20  20  20  34  2d  2d  7c  20  20  20  2b  20  20  20
                              4   -   -   |               +
0000020  2b  20  20  20  2b  20  20  20  2b  20  20  20  2b  20  20  20
              +               +               +               +
0000040  2b  20  20  20  7c  2d  2d  34  20  20  20  20  20  20  20  20
              +               |   -   -   4
0000060  20  7c  20  20  20  20  20  20  0a
                  |                          \n
0000071

FILE 2 (without trailing spaces):
0000000  20  20  20  20  20  34  2d  2d  7c  20  20  20  2b  20  20  20
                              4   -   -   |               +
0000020  2b  20  20  20  2b  20  20  20  2b  20  20  20  2b  20  20  20
              +               +               +               +
0000040  2b  20  20  20  7c  2d  2d  34  20  20  20  20  20  20  20  20
              +               |   -   -   4
0000060  20  7c  0a
                  |  \n
0000063

==================================================
3. RUNNING DIFF TESTS
==================================================
--> Test A: Combined '-iBZ'
1c1
<      4--|   +   +   +   +   +   +   |--4         |
---
>      4--|   +   +   +   +   +   +   |--4         |
Exit Code: 1

--> Test B: Separated '-i -B -Z'
1c1
<      4--|   +   +   +   +   +   +   |--4         |
---
>      4--|   +   +   +   +   +   +   |--4         |
Exit Code: 1

--> Test C: Combined '-iBb' (Reference)
Exit Code: 0

==================================================
4. EXPECTED VS. ACTUAL BEHAVIOR
==================================================
Expected: Since both files use clean POSIX line feeds (0x0A) and standard
ASCII spaces (0x20), '-Z' ('--ignore-trailing-space') should ignore the
trailing 0x20 bytes after '|' and evaluate exit code 0.
Actual: Both '-iBZ' and '-i -B -Z' flag a difference on line 1 and exit
with code 1. '-iBb' correctly ignores the trailing whitespace and returns
exit code 0.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2026   by DJ Delorie     Updated Sep 20 2026