diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2015-09-18 12:12:05 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2015-09-20 00:14:32 +0200 |
commit | b712864e9cf499f1298c1aca1ad8a8b17e145079 (patch) | |
tree | 7d4cc389b8f3de986dcea9414ebed559f6a36c30 /lib/system.ml | |
parent | bfd0ee9503cf04b51b2dd40d4ad2a904b07ac323 (diff) |
Revert "On MacOS X, ensuring that files found in the file system have the"
and "Continuing incomplete 4b5af0d6e9ec1 (on MacOS X, ensuring that files"
and "Continuing 4b5af0d6e9 and 69941d4e19 about filename case check on MacOS X."
This reverts commits 4b5af0d6e9ec1343a2c3ff9f856a019fa93c3606
and 69941d4e195650bf59285b897c14d6287defea0f
and e7043eec55085f4101bfb126d8829de6f6086c5a.
Trying to emulate a case sensitive file system on top of a case aware one is
too costly: 3x slowdown when compiling the stdlib or CompCert.
Diffstat (limited to 'lib/system.ml')
-rw-r--r-- | lib/system.ml | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/system.ml b/lib/system.ml index 27e21204c..d1cdd8efc 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -53,18 +53,6 @@ let all_subdirs ~unix_path:root = if exists_dir root then traverse root []; List.rev !l -let file_exists_respecting_case f = - if Coq_config.arch = "Darwin" then - (* ensure that the file exists with expected case on the - case-insensitive but case-preserving default MacOS file system *) - let rec aux f = - let bf = Filename.basename f in - let df = Filename.dirname f in - (String.equal df "." || String.equal df "/" || aux df) - && Array.exists (String.equal bf) (Sys.readdir df) - in aux f - else Sys.file_exists f - let rec search paths test = match paths with | [] -> [] @@ -89,7 +77,7 @@ let where_in_path ?(warn=true) path filename = in check_and_warn (search path (fun lpe -> let f = Filename.concat lpe filename in - if file_exists_respecting_case f then [lpe,f] else [])) + if Sys.file_exists f then [lpe,f] else [])) let where_in_path_rex path rex = search path (fun lpe -> @@ -105,7 +93,7 @@ let where_in_path_rex path rex = let find_file_in_path ?(warn=true) paths filename = if not (Filename.is_implicit filename) then - if file_exists_respecting_case filename then + if Sys.file_exists filename then let root = Filename.dirname filename in root, filename else |