[project @ 2004-01-06 12:40:00 by simonmar]
[ghc-base.git] / include / HsBase.h
index 71fd475..9db6133 100644 (file)
 #include "timeUtils.h"
 #endif
 
-/* in ghc_errno.c */
-int *ghcErrno(void);
-
 /* in system.c */
 HsInt systemCmd(HsAddr cmd);
 
@@ -206,6 +203,9 @@ StgWord64 stg_integerToWord64 (StgInt sa, StgByteArray /* Really: mp_limb_t* */
 # endif
 #endif
 
+INLINE int __hscore_get_errno(void) { return errno; }
+INLINE int __hscore_set_errno(int e) { errno = e; }
+
 #if !defined(_MSC_VER)
 INLINE int __hscore_s_isreg(m)  { return S_ISREG(m);  }
 INLINE int __hscore_s_isdir(m)  { return S_ISDIR(m);  }