New patches from Fedora.
[fedora-mingw.git] / ocaml / mingw32-ocaml-3.11.0+beta1-filename-win32-dirsep.patch
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.
5
6 diff --exclude _build -urN ocaml-3.11.0+beta1.orig/stdlib/filename.ml ocaml-3.11.0+beta1.mingw/stdlib/filename.ml
7 --- ocaml-3.11.0+beta1.orig/stdlib/filename.ml  2007-01-09 13:42:17.000000000 +0000
8 +++ ocaml-3.11.0+beta1.mingw/stdlib/filename.ml 2008-11-15 14:34:37.000000000 +0000
9 @@ -68,7 +68,7 @@
10  module Win32 = struct
11    let current_dir_name = "."
12    let parent_dir_name = ".."
13 -  let dir_sep = "\\"
14 +  let dir_sep = "/"
15    let is_dir_sep s i = let c = s.[i] in c = '/' || c = '\\' || c = ':'
16    let rindex_dir_sep s =
17      let rec pos i =