From: Paul Eggert Date: Fri, 19 May 2017 03:40:42 +0000 (-0700) Subject: Fix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm X-Git-Tag: emacs-26.0.90~521^2~367 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e3e51f4e288379be6a8731b739b63b9386940f7;p=emacs.git Fix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm * 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 --- diff --git a/src/fileio.c b/src/fileio.c index acbf76e0d81..e5e350542f9 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