summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ocamlbuild/hygiene.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/ocamlbuild/hygiene.ml b/ocamlbuild/hygiene.ml
index e904afb44..97a9ea927 100644
--- a/ocamlbuild/hygiene.ml
+++ b/ocamlbuild/hygiene.ml
@@ -150,7 +150,9 @@ let check ?sanitize laws entry =
@ or@ use@ other@ options@ (such@ as@ defining@ hygiene@ exceptions\
@ or@ using@ the@ -no-hygiene@ option).@]"
m (if m = 1 then "" else "s") fn;
- let oc = open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_text] 0o755 fn in
+ let oc = open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_binary] 0o755 fn in
+ (* See PR #5338: under mingw, one produces a shell script, which must follow
+ Unix eol convention; hence Open_binary. *)
let fp = Printf.fprintf in
fp oc "#!/bin/sh\n\
# File generated by ocamlbuild\n\