OS X x86_64 fix from Barney Stratford
[ghc-hetmet.git] / rts / RtsDllMain.c
index 250b63e..592eb09 100644 (file)
@@ -9,6 +9,7 @@
 #include "PosixSource.h"
 #include "Rts.h"
 #include "RtsAPI.h"
+#include "RtsDllMain.h"
 
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
@@ -18,9 +19,9 @@
 #if defined(__PIC__) && defined(mingw32_TARGET_OS)
 BOOL
 WINAPI
-DllMain ( HINSTANCE hInstance
+DllMain ( HINSTANCE hInstance STG_UNUSED
         , DWORD reason
-       , LPVOID reserved
+       , LPVOID reserved STG_UNUSED
        )
 {
   /*
@@ -30,7 +31,11 @@ DllMain ( HINSTANCE hInstance
    *       you pass to the RTS.
    */
   switch (reason) {
-  case DLL_PROCESS_DETACH: shutdownHaskell();
+  
+  // shutdownHaskelAndExit() is already being called,
+  //   so I don't think we need this. BL 2009/11/17
+  //case DLL_PROCESS_DETACH: shutdownHaskell();
   }
   return TRUE;
 }