diff -ur findlib-0.8.1.original/Makefile findlib-0.8.1/Makefile
--- findlib-0.8.1.original/Makefile	Mon Jan 13 09:41:25 2003
+++ findlib-0.8.1/Makefile	Thu Mar 13 00:16:24 2003
@@ -142,41 +142,41 @@
 	$(MAKE) dist
 
 install: all
-	mkdir -p $(PREFIX)$(OCAML_SITELIB)/$(NAME)
-	mkdir -p $(PREFIX)$(OCAMLFIND_BIN)
-	cp topfind $(PREFIX)$(OCAML_CORE_STDLIB)
-	./file_exists $(PREFIX)$(OCAML_CORE_STDLIB)/findlib || ln -s topfind $(PREFIX)$(OCAML_CORE_STDLIB)/findlib # compat
-	./file_exists $(PREFIX)$(OCAML_CORE_STDLIB)/ocamlfind || ln -s topfind $(PREFIX)$(OCAML_CORE_STDLIB)/ocamlfind # compat
+	mkdir -p "$(PREFIX)$(OCAML_SITELIB)/$(NAME)"
+	mkdir -p "$(PREFIX)$(OCAMLFIND_BIN)"
+	cp topfind "$(PREFIX)$(OCAML_CORE_STDLIB)"
+	./file_exists "$(PREFIX)$(OCAML_CORE_STDLIB)/findlib" || ln -s topfind "$(PREFIX)$(OCAML_CORE_STDLIB)/findlib" # compat
+	./file_exists "$(PREFIX)$(OCAML_CORE_STDLIB)/ocamlfind" || ln -s topfind "$(PREFIX)$(OCAML_CORE_STDLIB)/ocamlfind" # compat
 	files=`./collect_files Makefile.config findlib.cmi findlib.mli findlib.cma findlib_mt.cma findlib_unix.cma topfind.cmi topfind.mli findlib_top.cma findlib.cmxa findlib.a findlib_mt.cmxa findlib_mt.a findlib_unix.cmxa findlib_unix.a META toolbox/make_wizard$(EXEC_SUFFIX) toolbox/make_wizard.pattern` && \
-	cp $$files $(PREFIX)$(OCAML_SITELIB)/$(NAME)
-	f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
-	cp $$f $(PREFIX)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)
-	mkdir -p $(PREFIX)$(OCAMLFIND_MAN)/man1 $(PREFIX)$(OCAMLFIND_MAN)/man3 $(PREFIX)$(OCAMLFIND_MAN)/man5
-	cp doc/man/ocamlfind.1 $(PREFIX)$(OCAMLFIND_MAN)/man1
-	cp doc/man/Findlib.3 doc/man/Topfind.3 $(PREFIX)$(OCAMLFIND_MAN)/man3
-	cp doc/man/META.5 doc/man/site-lib.5 doc/man/findlib.conf.5 $(PREFIX)$(OCAMLFIND_MAN)/man5
+	cp $$files "$(PREFIX)$(OCAML_SITELIB)/$(NAME)"
+	f="ocamlfind$(EXEC_SUFFIX)"; { test -f "ocamlfind_opt$(EXEC_SUFFIX)" && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
+	cp $$f "$(PREFIX)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
+	mkdir -p "$(PREFIX)$(OCAMLFIND_MAN)/man1" "$(PREFIX)$(OCAMLFIND_MAN)/man3" "$(PREFIX)$(OCAMLFIND_MAN)/man5"
+	cp doc/man/ocamlfind.1 "$(PREFIX)$(OCAMLFIND_MAN)/man1"
+	cp doc/man/Findlib.3 doc/man/Topfind.3 "$(PREFIX)$(OCAMLFIND_MAN)/man3"
+	cp doc/man/META.5 doc/man/site-lib.5 doc/man/findlib.conf.5 "$(PREFIX)$(OCAMLFIND_MAN)/man5"
 	$(MAKE) install-meta
-	mkdir -p `dirname $(PREFIX)$(OCAMLFIND_CONF)`
-	@if [ ! -f $(PREFIX)$(OCAMLFIND_CONF) ]; then echo "!!! Keeping old $(PREFIX)$(OCAMLFIND_CONF) !!!"; fi
-	test -f $(PREFIX)$(OCAMLFIND_CONF) || cp findlib.conf $(PREFIX)$(OCAMLFIND_CONF)
+	mkdir -p "`dirname \"$(PREFIX)$(OCAMLFIND_CONF)\"`"
+	@if [ ! -f "$(PREFIX)$(OCAMLFIND_CONF)" ]; then echo "!!! Keeping old $(PREFIX)$(OCAMLFIND_CONF) !!!"; fi
+	test -f "$(PREFIX)$(OCAMLFIND_CONF)" || cp findlib.conf "$(PREFIX)$(OCAMLFIND_CONF)"
 
 install-meta:
-	for x in `ls site-lib`; do if [ "$$x" != "CVS" -a -f "site-lib/$$x/META" ]; then mkdir -p $(PREFIX)$(OCAML_SITELIB)/$$x; cp site-lib/$$x/META $(PREFIX)$(OCAML_SITELIB)/$$x; fi; done
+	for x in `ls site-lib`; do if [ "$$x" != "CVS" -a -f "site-lib/$$x/META" ]; then mkdir -p "$(PREFIX)$(OCAML_SITELIB)/$$x"; cp site-lib/$$x/META "$(PREFIX)$(OCAML_SITELIB)/$$x"; fi; done
 
 
 uninstall:
 	$(MAKE) uninstall-meta
-	rm -f $(PREFIX)$(OCAML_CORE_STDLIB)/findlib
-	rm -rf $(PREFIX)$(OCAML_SITELIB)/$(NAME)
-	rm -f $(PREFIX)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)
-	rm -f $(PREFIX)$(OCAMLFIND_MAN)/man1/ocamlfind.1
-	rm -f $(PREFIX)$(OCAMLFIND_MAN)/man3/Findlib.3
-	rm -f $(PREFIX)$(OCAMLFIND_MAN)/man3/Topfind.3
-	rm -f $(PREFIX)$(OCAMLFIND_MAN)/man5/META.5
-	rm -f $(PREFIX)$(OCAMLFIND_MAN)/man5/site-lib.5
+	rm -f "$(PREFIX)$(OCAML_CORE_STDLIB)/findlib"
+	rm -rf "$(PREFIX)$(OCAML_SITELIB)/$(NAME)"
+	rm -f "$(PREFIX)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
+	rm -f "$(PREFIX)$(OCAMLFIND_MAN)/man1/ocamlfind.1"
+	rm -f "$(PREFIX)$(OCAMLFIND_MAN)/man3/Findlib.3"
+	rm -f "$(PREFIX)$(OCAMLFIND_MAN)/man3/Topfind.3"
+	rm -f "$(PREFIX)$(OCAMLFIND_MAN)/man5/META.5"
+	rm -f "$(PREFIX)$(OCAMLFIND_MAN)/man5/site-lib.5"
 
 uninstall-meta:
-	for x in `ls site-lib`; do if [ "$$x" != "CVS" ]; then rm -rf $(PREFIX)$(OCAML_SITELIB)/$$x; fi; done
+	for x in `ls site-lib`; do if [ "$$x" != "CVS" ]; then rm -rf "$(PREFIX)$(OCAML_SITELIB)/$$x"; fi; done
 
 
 depend: *.ml *.mli findlib.ml fl_meta.ml fl_metascanner.ml
@@ -218,3 +218,4 @@
 include Makefile.config
 include depend
 
+export EXEC_SUFFIX
diff -ur findlib-0.8.1.original/configure findlib-0.8.1/configure
--- findlib-0.8.1.original/configure	Mon Jan 13 09:41:26 2003
+++ findlib-0.8.1/configure	Wed Mar 12 23:40:44 2003
@@ -96,8 +96,20 @@
 apply_cygpath () {
     v=$1
     eval "p=\"\$$v\""
-    p="`cygpath -w -s \"$p\"`"
-    p="`cygpath -u \"$p\"`"
+    case "$use_cygpath" in
+    3)
+      echo "converting mingw -> win32 path ($p) ..."
+      p="`cmd //c echo \"$p\"| sed -e \"s@\\\\\\\\@/@g\" -e \"s/ \$//\"`"
+      ;;
+    2)
+      echo "applying reverse cygpath for $v ($p) ..."
+      p="`cygpath -m \"$p\"`"
+      ;;
+    1)
+      echo "applying cygpath for $v ($p) ..."
+      p="`cygpath -w -s \"$p\"`"
+      p="`cygpath -u \"$p\"`"
+    esac
     eval "$v=\"$p\""
 }
 
@@ -132,6 +144,9 @@
         -config) ocamlfind_config=$2
 	         shift 2
 		 ;;
+	-revcygpath) use_cygpath=2
+	         shift
+		 ;;
 	-cygpath) use_cygpath=1
 	         shift
 		 ;;
@@ -149,10 +164,14 @@
     esac
 done
 
+case "`uname`" in
+    MINGW32_*)
+    use_cygpath=3
+esac
 
 
 #######################################################################
-# inspect the system
+# Inspect the system
 
 # Some standard Unix tools must be available:
 
@@ -172,7 +191,6 @@
 fi
 
 if [ ${use_cygpath} -gt 0 ]; then
-    echo "Applying cygpath..."
     apply_cygpath ocaml_core_stdlib
 fi
 
@@ -180,7 +198,7 @@
 
 if [ -z "$ocaml_sitelib" ]; then
     case "$ocaml_core_stdlib" in
-	/opt/*)		ocaml_sitelib=`dirname ${ocaml_core_stdlib}`/site-lib
+	/opt/*)		ocaml_sitelib=`dirname "${ocaml_core_stdlib}"`/site-lib
 			;;
 	*)		ocaml_sitelib="${ocaml_core_stdlib}/site-lib"
 			;;
@@ -190,12 +208,16 @@
 # Find out the directory where ocamlc is:
 
 ocamlc=`get_path ocamlc`
-ocaml_core_bin=`dirname ${ocamlc}`
+ocaml_core_bin=`dirname "${ocamlc}"`
 
 # Set the directory of ocamlfind:
 
 test -n "$ocamlfind_bin" || ocamlfind_bin="$ocaml_core_bin"
 
+if [ ${use_cygpath} -gt 0 ]; then
+    apply_cygpath ocamlfind_bin
+fi
+
 # Find the directory for the manual:
 
 # Fallback:
@@ -223,10 +245,14 @@
 	ocaml_core_man="$d/man"
 	d="/"
     else
-	d=`dirname $d`
+	d="`dirname \"$d\"`"
     fi
 done
 
+if [ ${use_cygpath} -gt 0 ]; then
+    apply_cygpath ocaml_core_bin
+fi
+
 # Set the directory for ocamlfind's manuals:
 
 test -n "$ocamlfind_man" || ocamlfind_man="$ocaml_core_man"
@@ -237,7 +263,7 @@
     d="$ocaml_core_bin"
     case "$d" in
         */bin)
-	    ocamlfind_config=`dirname $d`/etc/ocamlfind.conf
+	    ocamlfind_config="`dirname \"$d\"`/etc/ocamlfind.conf"
 	    ;;
 	*)
 	    ocamlfind_config=/usr/local/etc/ocamlfind.conf
@@ -246,6 +272,9 @@
     esac
 fi
 
+if [ ${use_cygpath} -gt 0 ]; then
+    apply_cygpath ocamlfind_config
+fi
 
 ######################################################################
 # Test if bytecode threads work
diff -ur findlib-0.8.1.original/frontend.ml findlib-0.8.1/frontend.ml
--- findlib-0.8.1.original/frontend.ml	Mon Jan 13 09:41:27 2003
+++ findlib-0.8.1/frontend.ml	Thu Mar 13 00:47:44 2003
@@ -210,6 +210,13 @@
 
 
 let run_command ?filter verbose cmd args =
+  let args =
+    if Sys.os_type <> "Win32" then args else
+    List.map
+      (fun s ->
+         if String.contains s ' ' || String.contains s '\\' then
+         Filename.quote s else s) args
+  in
   if verbose then begin
     print_string ("+ " ^ cmd ^ " " ^
 		  String.concat " " args ^ "\n");
@@ -494,7 +501,8 @@
 	 cmd ^ " " ^
 	 String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^
 	 String.concat " " (List.map Filename.quote pp_archives) ^ " " ^
-	 String.concat " " (List.map Filename.quote pp_opts)]
+	 String.concat " " (List.map Filename.quote pp_opts)
+	]
 ;;
 
 
diff -ur findlib-0.8.1.original/site-lib/threads/META.in findlib-0.8.1/site-lib/threads/META.in
--- findlib-0.8.1.original/site-lib/threads/META.in	Mon Jan 13 09:41:27 2003
+++ findlib-0.8.1/site-lib/threads/META.in	Wed Mar  5 16:29:37 2003
@@ -2,7 +2,7 @@
 `# Specifications for the "threads" library:'
 `version = "[distributed with Ocaml]"'
 `requires = "unix"'
-`directory = "^/threads"'
+`directory = "+threads"'
 `type_of_threads = "'type_of_threads`"'
 
 `# --- Bytecode-only threads:'
diff -ur findlib-0.8.1.original/toolbox/Makefile findlib-0.8.1/toolbox/Makefile
--- findlib-0.8.1.original/toolbox/Makefile	Mon Jan 13 09:41:27 2003
+++ findlib-0.8.1/toolbox/Makefile	Wed Mar  5 16:06:41 2003
@@ -1,6 +1,6 @@
 include ../Makefile.config
 
-all: make_wizard
+all: make_wizard$(EXEC_SUFFIX)
 
 opt:
 	true
