diff options
| author | Paul Eggert | 2017-05-18 20:40:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-05-18 20:42:35 -0700 |
| commit | 7e3e51f4e288379be6a8731b739b63b9386940f7 (patch) | |
| tree | 42ea05ba98ad0fbddeabd137dba00c6b6c5cf0e5 /src | |
| parent | af4ac3dc852647e5ea41be5ffc387be591978aee (diff) | |
| download | emacs-7e3e51f4e288379be6a8731b739b63b9386940f7.tar.gz emacs-7e3e51f4e288379be6a8731b739b63b9386940f7.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 9 |
1 files changed, 7 insertions, 2 deletions
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) | |||
| 2294 | & VOL_CAP_FMT_CASE_SENSITIVE); | 2294 | & VOL_CAP_FMT_CASE_SENSITIVE); |
| 2295 | } | 2295 | } |
| 2296 | } | 2296 | } |
| 2297 | else if (DARWIN_OS_CASE_SENSITIVE_FIXME == 2) | 2297 | # if DARWIN_OS_CASE_SENSITIVE_FIXME == 2 |
| 2298 | { | 2298 | { |
| 2299 | /* The following is based on | 2299 | /* The following is based on |
| 2300 | http://lists.apple.com/archives/darwin-dev/2007/Apr/msg00010.html. */ | 2300 | http://lists.apple.com/archives/darwin-dev/2007/Apr/msg00010.html. |
| 2301 | It is normally not even compiled, since it runs afoul of | ||
| 2302 | static checking. See: | ||
| 2303 | http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html | ||
| 2304 | */ | ||
| 2301 | struct attrlist alist; | 2305 | struct attrlist alist; |
| 2302 | unsigned char buffer[sizeof (vol_capabilities_attr_t) + sizeof (size_t)]; | 2306 | unsigned char buffer[sizeof (vol_capabilities_attr_t) + sizeof (size_t)]; |
| 2303 | 2307 | ||
| @@ -2309,6 +2313,7 @@ file_name_case_insensitive_p (const char *filename) | |||
| 2309 | vol_capabilities_attr_t *vcaps = buffer; | 2313 | vol_capabilities_attr_t *vcaps = buffer; |
| 2310 | return !(vcaps->capabilities[0] & VOL_CAP_FMT_CASE_SENSITIVE); | 2314 | return !(vcaps->capabilities[0] & VOL_CAP_FMT_CASE_SENSITIVE); |
| 2311 | } | 2315 | } |
| 2316 | # endif | ||
| 2312 | #endif /* DARWIN_OS */ | 2317 | #endif /* DARWIN_OS */ |
| 2313 | 2318 | ||
| 2314 | #if defined CYGWIN || defined DOS_NT | 2319 | #if defined CYGWIN || defined DOS_NT |