[project @ 2001-07-12 10:34:54 by rrt]
[ghc-hetmet.git] / ghc / lib / std / cbits / writeError.c
index e948233..591f5ad 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1998
  *
- * $Id: writeError.c,v 1.2 1998/12/02 13:28:05 simonm Exp $
+ * $Id: writeError.c,v 1.7 2001/07/12 10:34:54 rrt Exp $
  *
  * hPutStr Runtime Support
  */
@@ -17,18 +17,18 @@ implementation in one or two places.)
 */
 
 #include "Rts.h"
-#include "stgio.h"
+#include "RtsUtils.h"
+#include "HsStd.h"
 
 void
-writeErrString__ (msg_hdr, msg, len)
-StgAddr msg_hdr;
-StgByteArray msg;
-StgInt len;
+writeErrString__ (HsAddr msg_hdr, HsAddr msg, HsInt len)
 {
   int count = 0;
   char* p  = (char*)msg;
   char  nl = '\n';
 
+  resetNonBlockingFd(2);
+
   /* Print error msg header */
   if (msg_hdr) {
     ((void (*)(int))msg_hdr)(2/*stderr*/);