]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 May 2017 03:40:42 +0000 (20:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 May 2017 03:42:35 +0000 (20:42 -0700)
* 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

index acbf76e0d8110be304d524dac55a9e6497623d83..e5e350542f9a8735db67cc026ad1b29e48c07828 100644 (file)
@@ -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