Combined Makefiles again: These libraries depend on the unix library,
but really they depend on either the ("real") unix library or the
win32unix library.  Include both, with win32unix first, on the basis
that this should pick up the correct one in all cases.

Index: build-tree/ocaml-3.12.1/otherlibs/systhreads/Makefile
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/systhreads/Makefile	2010-04-27 09:55:08.000000000 +0200
+++ build-tree/ocaml-3.12.1/otherlibs/systhreads/Makefile	2011-10-09 04:24:34.770935497 +0200
@@ -15,8 +15,8 @@
 
 include ../../config/Makefile
 
-CAMLC=../../ocamlcomp.sh -I ../unix
-CAMLOPT=../../ocamlcompopt.sh -I ../unix
+CAMLC=../../ocamlcomp.sh -I ../win32unix -I ../unix
+CAMLOPT=../../ocamlcompopt.sh -I ../win32unix -I ../unix
 MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
 COMPFLAGS=-warn-error A -g
 
Index: build-tree/ocaml-3.12.1/otherlibs/bigarray/Makefile
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/bigarray/Makefile	2008-01-04 10:52:27.000000000 +0100
+++ build-tree/ocaml-3.12.1/otherlibs/bigarray/Makefile	2011-10-09 04:22:45.109791401 +0200
@@ -14,8 +14,8 @@
 # $Id: Makefile 8748 2008-01-04 09:52:27Z xleroy $
 
 LIBNAME=bigarray
-EXTRACFLAGS=-I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
-EXTRACAMLFLAGS=-I ../unix
+EXTRACFLAGS=-I../win32unix -I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
+EXTRACAMLFLAGS=-I ../win32unix -I ../unix
 COBJS=bigarray_stubs.$(O) mmap_unix.$(O)
 CAMLOBJS=bigarray.cmo
 HEADERS=bigarray.h
Index: build-tree/ocaml-3.12.1/myocamlbuild.ml
===================================================================
--- build-tree.orig/ocaml-3.12.1/myocamlbuild.ml	2011-02-08 15:07:47.000000000 +0100
+++ build-tree/ocaml-3.12.1/myocamlbuild.ml	2011-10-09 04:22:45.109791401 +0200
@@ -107,9 +107,11 @@
   if mixed then ".."/dir else dir;;
 
 let unix_dir =
-  match Sys.os_type with
-  | "Win32" -> if_mixed_dir "otherlibs/win32unix"
-  | _       -> if_mixed_dir "otherlibs/unix";;
+  if_mixed_dir (
+    let win32path = "otherlibs/win32unix" in
+    if Sys.file_exists (win32path / "unix.cma") then win32path
+    else "otherlibs/unix"
+  );;
 
 let threads_dir    = if_mixed_dir "otherlibs/threads";;
 let systhreads_dir = if_mixed_dir "otherlibs/systhreads";;
Index: build-tree/ocaml-3.12.1/ocamldoc/Makefile
===================================================================
--- build-tree.orig/ocaml-3.12.1/ocamldoc/Makefile	2011-05-02 15:14:14.000000000 +0200
+++ build-tree/ocaml-3.12.1/ocamldoc/Makefile	2011-10-09 04:22:45.109791401 +0200
@@ -62,6 +62,7 @@
 INCLUDES_NODEP=	-I $(OCAMLSRCDIR)/stdlib \
 	-I $(OCAMLSRCDIR)/otherlibs/str \
 	-I $(OCAMLSRCDIR)/otherlibs/dynlink \
+	-I $(OCAMLSRCDIR)/otherlibs/win32unix \
 	-I $(OCAMLSRCDIR)/otherlibs/unix \
 	-I $(OCAMLSRCDIR)/otherlibs/num \
 	-I $(OCAMLSRCDIR)/otherlibs/graph
