[project @ 2001-01-26 17:51:40 by rrt]
authorrrt <unknown>
Fri, 26 Jan 2001 17:51:40 +0000 (17:51 +0000)
committerrrt <unknown>
Fri, 26 Jan 2001 17:51:40 +0000 (17:51 +0000)
Windows fixes.

ghc/lib/std/cbits/errno.c
ghc/lib/std/cbits/errno.h [new file with mode: 0644]
ghc/lib/std/cbits/tcSetAttr.c

index 3364aaa..ad6c7fc 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: errno.c,v 1.3 1998/12/02 13:27:20 simonm Exp $
+ * $Id: errno.c,v 1.4 2001/01/26 17:51:40 rrt Exp $
  *
  * GHC Error Number Conversion
  */
@@ -9,6 +9,16 @@
 #include "Rts.h"
 #include "stgio.h"
 
+
+/* Raw errno */
+
+int *ghcErrno(void) {
+  return &errno;
+}
+
+
+/* Fancy errno */
+
 int ghc_errno = 0;
 int ghc_errtype = 0;
 
diff --git a/ghc/lib/std/cbits/errno.h b/ghc/lib/std/cbits/errno.h
new file mode 100644 (file)
index 0000000..80cb78b
--- /dev/null
@@ -0,0 +1,15 @@
+/* -----------------------------------------------------------------------------
+ * $Id: errno.h,v 1.1 2001/01/26 17:51:40 rrt Exp $
+ *
+ * (c) The GHC Team 2001
+ *
+ * Haskell-usable version of errno
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef GHCERRNO_H
+#define GHCERRNO_H
+
+int *ghcErrno(void);
+
+#endif
index 02f9fdb..c6c82ba 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The GHC Team 2001
  *
- * $Id: tcSetAttr.c,v 1.1 2001/01/16 14:06:14 simonmar Exp $
+ * $Id: tcSetAttr.c,v 1.2 2001/01/26 17:51:40 rrt Exp $
  *
  * A wrapper around tcsetattr() which works for a background process.
  */
@@ -21,6 +21,7 @@
 #include <unistd.h>
 #endif
 
+#ifndef mingw32_TARGET_OS
 /* tcsetattr() when invoked by a background process causes the process
  * to be sent SIGTTOU regardless of whether the process has TOSTOP set
  * in its terminal flags (try it...).  This function provides a
@@ -40,3 +41,6 @@ tcSetAttr( int fd, int options, const struct termios *tp )
 
     return res;
 }
+#else
+#define tcSetAttr(f,o,t) tcsetattr((f),(o),(t))
+#endif