updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / mingw32-ocaml / mingw32-ocaml-filename-win32-dirsep.patch
blobca743c65c14defe48ddac023e8f587f4e120113d
1 Our compiler will think that os_type = "Win32". Unfortunately in
2 the default OCaml this has the negative effect of causing it to
3 use '\' character in paths. Since it's really running on a Linux
4 kernel, that won't work. This is a quick and dirty fix.
6 Index: build-tree/ocaml-3.12.0/stdlib/filename.ml
7 ===================================================================
8 --- build-tree.orig/ocaml-3.12.0/stdlib/filename.ml 2010-01-20 17:26:46.000000000 +0100
9 +++ build-tree/ocaml-3.12.0/stdlib/filename.ml 2010-06-23 19:30:22.000000000 +0200
10 @@ -68,7 +68,7 @@
11 module Win32 = struct
12 let current_dir_name = "."
13 let parent_dir_name = ".."
14 - let dir_sep = "\\"
15 + let dir_sep = "/"
16 let is_dir_sep s i = let c = s.[i] in c = '/' || c = '\\' || c = ':'
17 let rindex_dir_sep s =
18 let rec pos i =