From 7e3e51f4e288379be6a8731b739b63b9386940f7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 18 May 2017 20:40:42 -0700 Subject: [PATCH 4/4] Fix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/fileio.c (file_name_case_insensitive_p): Don’t compile the (DARWIN_OS_CASE_SENSITIVE_FIXME == 2) code unless DARWIN_OS_CASE_SENSITIVE_FIXME is 2. Problem reported by Philipp Stephani in: http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html --- src/fileio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index acbf76e..e5e3505 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2294,10 +2294,14 @@ file_name_case_insensitive_p (const char *filename) & VOL_CAP_FMT_CASE_SENSITIVE); } } - else if (DARWIN_OS_CASE_SENSITIVE_FIXME == 2) +# if DARWIN_OS_CASE_SENSITIVE_FIXME == 2 { /* The following is based on - http://lists.apple.com/archives/darwin-dev/2007/Apr/msg00010.html. */ + http://lists.apple.com/archives/darwin-dev/2007/Apr/msg00010.html. + It is normally not even compiled, since it runs afoul of + static checking. See: + http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html + */ struct attrlist alist; unsigned char buffer[sizeof (vol_capabilities_attr_t) + sizeof (size_t)]; @@ -2309,6 +2313,7 @@ file_name_case_insensitive_p (const char *filename) vol_capabilities_attr_t *vcaps = buffer; return !(vcaps->capabilities[0] & VOL_CAP_FMT_CASE_SENSITIVE); } +# endif #endif /* DARWIN_OS */ #if defined CYGWIN || defined DOS_NT -- 2.7.4