% -----------------------------------------------------------------------------
-% $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
%
-- ------------
-- 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
/*
* (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
*/
#include "HsStd.h"
/* Raw errno */
+/* Covers up the fact that on Windows this is a function */
int *ghcErrno(void) {
return &errno;