diff --git a/ghc/interpreter/dynamic.c b/ghc/interpreter/dynamic.c
index 3fb2a615053dd8e0cbe206e253c7e89cd3de6723..be6fa5b53ee86c563ccc54f5939a059a510b554a 100644
--- a/ghc/interpreter/dynamic.c
+++ b/ghc/interpreter/dynamic.c
@@ -7,8 +7,8 @@
  * Hugs version 1.4, December 1997
  *
  * $RCSfile: dynamic.c,v $
- * $Revision: 1.5 $
- * $Date: 1999/06/07 17:22:31 $
+ * $Revision: 1.6 $
+ * $Date: 1999/10/15 19:11:54 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -16,7 +16,41 @@
 #include "errors.h"
 #include "dynamic.h"
 
-#if HAVE_DLFCN_H /* eg LINUX, SOLARIS, ULTRIX */
+#if HAVE_WINDOWS_H && !defined(__MSDOS__)
+
+#include <windows.h>
+
+ObjectFile loadLibrary(fn)
+String fn; {
+    return LoadLibrary(fn);
+}
+
+void* lookupSymbol(file,symbol)
+ObjectFile file;
+String symbol; {
+    return GetProcAddress(file,symbol);
+}
+
+const char *dlerror(void)
+{
+   return "<unknown>";
+}
+
+void* getDLLSymbol(dll,symbol)  /* load dll and lookup symbol */
+String dll;
+String symbol; {
+    ObjectFile instance = LoadLibrary(dll);
+    if (NULL == instance) {
+        /* GetLastError allegedly provides more detail - in practice,
+	 * it tells you nothing more.
+         */
+        ERRMSG(0) "Error while importing DLL \"%s\"", dll
+        EEND;
+    }
+    return GetProcAddress(instance,symbol);
+}
+
+#elif HAVE_DLFCN_H /* eg LINUX, SOLARIS, ULTRIX */
 
 #include <stdio.h>
 #include <dlfcn.h>
@@ -65,40 +99,6 @@ String symbol; {
     return (0 == shl_findsym(&instance,symbol,TYPE_PROCEDURE,&r)) ? r : 0;
 }
 
-#elif HAVE_WINDOWS_H && !defined(__MSDOS__)
-
-#include <windows.h>
-
-ObjectFile loadLibrary(fn)
-String fn; {
-    return LoadLibrary(fn);
-}
-
-void* lookupSymbol(file,symbol)
-ObjectFile file;
-String symbol; {
-    return GetProcAddress(file,symbol);
-}
-
-const char *dlerror(void)
-{
-   return "<unknown>";
-}
-
-void* getDLLSymbol(dll,symbol)  /* load dll and lookup symbol */
-String dll;
-String symbol; {
-    ObjectFile instance = LoadLibrary(dll);
-    if (NULL == instance) {
-        /* GetLastError allegedly provides more detail - in practice,
-	 * it tells you nothing more.
-         */
-        ERRMSG(0) "Error while importing DLL \"%s\"", dll
-        EEND;
-    }
-    return GetProcAddress(instance,symbol);
-}
-
 #else /* Dynamic loading not available */
 
 void* getDLLSymbol(dll,symbol)  /* load dll and lookup symbol */
diff --git a/ghc/interpreter/prelude.h b/ghc/interpreter/prelude.h
index 8886a3af4fa907e7847b369c6c45d59862b26c26..3d41bb16094bbcaf23c8286594045be37504d151 100644
--- a/ghc/interpreter/prelude.h
+++ b/ghc/interpreter/prelude.h
@@ -8,8 +8,8 @@
  * Hugs version 1.4, December 1997
  *
  * $RCSfile: prelude.h,v $
- * $Revision: 1.3 $
- * $Date: 1999/02/03 17:08:36 $
+ * $Revision: 1.4 $
+ * $Date: 1999/10/15 19:11:55 $
  * ------------------------------------------------------------------------*/
 
 #include "config.h"
@@ -246,12 +246,12 @@ typedef void*           HpPtr;
 /* ToDo: this should probably go in dynamic.h - but then
  * storage.h has to include dynamic.h!
  */
-#if HAVE_DLFCN_H /* eg LINUX, SOLARIS, ULTRIX */
+#if HAVE_WINDOWS_H && !defined(__MSDOS__)
+typedef HINSTANCE ObjectFile;
+#elif HAVE_DLFCN_H /* eg LINUX, SOLARIS, ULTRIX */
 typedef void* ObjectFile; 
 #elif HAVE_DL_H /* eg HPUX */
 typedef shl_t ObjectFile;
-#elif HAVE_WINDOWS_H && !defined(__MSDOS__)
-typedef HINSTANCE ObjectFile;
 #else
 #warning GHC file loading not available on this machine
 #endif