[project @ 2001-07-13 11:11:34 by rrt]
authorrrt <unknown>
Fri, 13 Jul 2001 11:11:34 +0000 (11:11 +0000)
committerrrt <unknown>
Fri, 13 Jul 2001 11:11:34 +0000 (11:11 +0000)
Explain why errno is imported via a function

ghc/lib/std/PrelCError.lhs
ghc/lib/std/cbits/errno.c

index 0e3ac24..9979a00 100644 (file)
@@ -1,5 +1,5 @@
 % -----------------------------------------------------------------------------
-% $Id: PrelCError.lhs,v 1.9 2001/05/18 21:45:43 qrczak Exp $
+% $Id: PrelCError.lhs,v 1.10 2001/07/13 11:11:34 rrt Exp $
 %
 % (c) The FFI task force, 2000
 %
@@ -117,7 +117,8 @@ import IO           (IOError, Handle, ioError)
 -- ------------
 
 -- import of C function that gives address of errno
---
+-- This function exists because errno is a variable on some systems, but on
+-- Windows it is a macro for a function...
 foreign import "ghcErrno" unsafe _errno :: Ptr CInt
 
 -- Haskell representation for "errno" values
index 9f782b0..b5751f6 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The University of Glasgow, 2000-2001
  *
- * $Id: errno.c,v 1.5 2001/05/18 16:54:06 simonmar Exp $
+ * $Id: errno.c,v 1.6 2001/07/13 11:11:34 rrt Exp $
  *
  * GHC Error Number Conversion
  */
@@ -9,6 +9,7 @@
 #include "HsStd.h"
 
 /* Raw errno */
+/* Covers up the fact that on Windows this is a function */
 
 int *ghcErrno(void) {
   return &errno;