Fix the way the ocamldoc bytecode executable is called under Windows. (#906)
Fix the way the ocamldoc bytecode executable is called under Windows. (#906)

This fixes a problem related to the way ocamldoc's bytecode executable
is called under Windows, reported by @alainfrisch at
https://github.com/ocaml/ocaml/pull/808#issuecomment-257364340

As he explains, ``Even if the PATH is extended with explicit paths to
otherlibs/win32unix and otherlibs/str, ocamlrun will still look up
the stub dlls in the installation directory first, as can be seen by
setting OCAMLRUNPARAM=v=256. If another version was installed in the
same target directory before, the old dlls will be loaded which can lead
to failure (e.g. I just got "Fatal error: unknown C primitive 'unix_lstat'").
A fix could be to set:
CAML_LD_LIBRARY_PATH="../otherlibs/win32unix;../otherlibs/str"
instead of changing PATH''.

This commit implements the proposed fix, due to @alainfrisch.
gerdstolpmann/ocaml,gerdstolpmann/ocaml,msprotz/ocaml,msprotz/ocaml,yunxing/ocaml,yunxing/ocaml,msprotz/ocaml,gerdstolpmann/ocaml,msprotz/ocaml,gerdstolpmann/ocaml,gerdstolpmann/ocaml,msprotz/ocaml,yunxing/ocaml,yunxing/ocaml,yunxing/ocaml