summaryrefslogtreecommitdiff
path: root/t/t4253-am-keep-cr-dos.sh
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2010-10-04 12:53:11 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-10-06 10:51:14 -0700
commitb90d9b889588ca1cfd5667d1fa703d976edd71ee (patch)
treee41d27db561471ca6f95d3630b5c6a23fe4c373a /t/t4253-am-keep-cr-dos.sh
parentxdiff: cast arguments for ctype functions to unsigned char (diff)
downloadtgif-b90d9b889588ca1cfd5667d1fa703d976edd71ee.tar.xz
work around buggy S_ISxxx(m) implementations
There are buggy implementations of S_ISxxx(m) macros on some platforms (e.g. NetBSD). The issue is that NetBSD doesn't take care to wrap its macro arguments in parentheses, so on Linux and sane systems we have S_ISREG(m) defined as something like: (((m) & S_IFMT) == S_IFREG) But on NetBSD: ((m & _S_IFMT) == _S_IFREG) Since a caller in builtin/diff.c called our macro as `S_IFREG | 0644' this bug introduced a logic error on NetBSD, since the precedence of bit-wise & is higher than | in C. [jc: took change description from Ævar Arnfjörð Bjarmason's patch] Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4253-am-keep-cr-dos.sh')
0 files changed, 0 insertions, 0 deletions