[project @ 2000-03-14 01:52:25 by sof]
authorsof <unknown>
Tue, 14 Mar 2000 01:52:25 +0000 (01:52 +0000)
committersof <unknown>
Tue, 14 Mar 2000 01:52:25 +0000 (01:52 +0000)
Misc Win32 bitrot

ghc/lib/std/Makefile
ghc/lib/std/PrelIOBase.lhs
ghc/lib/std/cbits/Makefile
ghc/lib/std/cbits/closeFile.c
ghc/lib/std/cbits/progargs.c

index 51b68d2..e01d7c2 100644 (file)
@@ -114,7 +114,7 @@ ifeq "$(way)" "dll"
 PrelMain.dll_o : PrelMain.lhs
        $(RM) ../PrelMain.lhs
        $(CP) PrelMain.lhs ../
-       $(MAKE) -C .. PrelMain.dll_o way=dll HC_OPTS="$(filter-out -fcompiling-prelude, $(HC_OPTS))"
+       $(MAKE) -C .. PrelMain.dll_o way=dll HC=std/$(GHC_INPLACE) HC_OPTS="$(filter-out -fcompiling-prelude, $(HC_OPTS))"
        $(MV) ../PrelMain.dll_o .
        $(RM) ../PrelMain.lhs ../PrelMain.dll_hi
 endif
index 9f8aa77..c99197f 100644 (file)
@@ -1,5 +1,5 @@
 % -----------------------------------------------------------------------------
-% $Id: PrelIOBase.lhs,v 1.17 2000/01/30 10:11:32 simonmar Exp $
+% $Id: PrelIOBase.lhs,v 1.18 2000/03/14 01:52:25 sof Exp $
 % 
 % (c) The AQUA Project, Glasgow University, 1994-1998
 %
@@ -12,6 +12,7 @@ concretely; the @IO@ module itself exports abstractly.
 \begin{code}
 {-# OPTIONS -fno-implicit-prelude -#include "cbits/stgio.h" #-}
 #include "cbits/stgerror.h"
+#include "config.h"
 
 #ifndef __HUGS__ /* Hugs just includes this in PreludeBuiltin so no header needed */
 module PrelIOBase where
@@ -174,7 +175,7 @@ data IOErrorType
   | TimeExpired          | UnsatisfiedConstraints
   | UnsupportedOperation | UserError
   | EOF
-#ifdef _WIN32
+#if defined(cygwin32_TARGET_OS) || defined(mingw32_TARGET_OS)
   | ComError Int           -- HRESULT
 #endif
   deriving (Eq)
@@ -202,7 +203,7 @@ instance Show IOErrorType where
       UserError         -> "failed"
       UnsupportedOperation -> "unsupported operation"
       EOF              -> "end of file"
-#ifdef _WIN32
+#if defined(cygwin32_TARGET_OS) || defined(mingw32_TARGET_OS)
       ComError _       -> "COM error"
 #endif
 
index 38549e7..68d965e 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.12 1999/12/08 15:47:07 simonmar Exp $
+# $Id: Makefile,v 1.13 2000/03/14 01:52:25 sof Exp $
 
 TOP = ../../..
 include $(TOP)/mk/boilerplate.mk
@@ -28,7 +28,7 @@ $(DLL_NAME) : DllVersionInfo.o
 endif
 
 DLL_NAME = HScbits.dll
-DLL_IMPLIB_NAME = libHScbits_imp.a
+DLL_IMPLIB_NAME = libHS_cbits_imp.a
 DLL_DESCRIPTION = "Haskell Prelude helpers"
 SRC_BLD_DLL_OPTS += --export-all --output-def=HScbits.def DllVersionInfo.o
 SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lgmp -L. -L../../../rts/gmp -L../../../rts
@@ -36,7 +36,7 @@ SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lgmp -L. -L../../../rts/gmp -
 #
 # Compile the files using the Haskell compiler (ghc really).
 # 
-# CC=$(GHC_INPLACE)
+CC=$(GHC_INPLACE)
 
 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
 
index 1addd3f..f144c41 100644 (file)
@@ -1,13 +1,14 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: closeFile.c,v 1.7 1999/11/25 16:54:14 simonmar Exp $
+ * $Id: closeFile.c,v 1.8 2000/03/14 01:52:25 sof Exp $
  *
  * hClose Runtime Support
  */
 
 #include "Rts.h"
 #include "stgio.h"
+#include <errno.h>
 
 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 #define USE_WINSOCK
index c4519d6..30d89aa 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: progargs.c,v 1.2 1999/03/02 20:14:01 sof Exp $
+ * $Id: progargs.c,v 1.3 2000/03/14 01:52:25 sof Exp $
  *
  * System.getArgs Runtime Support
  */
@@ -9,9 +9,6 @@
 #include "Rts.h"
 #include "stgio.h"
 
-DLLIMPORT extern char** prog_argv;
-DLLIMPORT extern int prog_argc;
-
 StgAddr
 get_prog_argv(void)
 {