This patch just adds HsDirectory.h into the foreign imports of these
values. Without it, nhc98 cannot generate correct interfacing code.
fileNameEndClean name = if isDrive name then addTrailingPathSeparator name
else dropTrailingPathSeparator name
fileNameEndClean name = if isDrive name then addTrailingPathSeparator name
else dropTrailingPathSeparator name
-foreign import ccall unsafe "__hscore_R_OK" r_OK :: CInt
-foreign import ccall unsafe "__hscore_W_OK" w_OK :: CInt
-foreign import ccall unsafe "__hscore_X_OK" x_OK :: CInt
+foreign import ccall unsafe "HsDirectory.h __hscore_R_OK" r_OK :: CInt
+foreign import ccall unsafe "HsDirectory.h __hscore_W_OK" w_OK :: CInt
+foreign import ccall unsafe "HsDirectory.h __hscore_X_OK" x_OK :: CInt
-foreign import ccall unsafe "__hscore_S_IRUSR" s_IRUSR :: CMode
-foreign import ccall unsafe "__hscore_S_IWUSR" s_IWUSR :: CMode
-foreign import ccall unsafe "__hscore_S_IXUSR" s_IXUSR :: CMode
+foreign import ccall unsafe "HsDirectory.h __hscore_S_IRUSR" s_IRUSR :: CMode
+foreign import ccall unsafe "HsDirectory.h __hscore_S_IWUSR" s_IWUSR :: CMode
+foreign import ccall unsafe "HsDirectory.h __hscore_S_IXUSR" s_IXUSR :: CMode
#ifdef mingw32_HOST_OS
foreign import ccall unsafe "__hscore_S_IFDIR" s_IFDIR :: CMode
#endif
#ifdef mingw32_HOST_OS
foreign import ccall unsafe "__hscore_S_IFDIR" s_IFDIR :: CMode
#endif
-#ifdef __GLASGOW_HASKELL__
INLINE int __hscore_R_OK() { return R_OK; }
INLINE int __hscore_W_OK() { return W_OK; }
INLINE int __hscore_X_OK() { return X_OK; }
INLINE int __hscore_R_OK() { return R_OK; }
INLINE int __hscore_W_OK() { return W_OK; }
INLINE int __hscore_X_OK() { return X_OK; }
INLINE mode_t __hscore_S_IWUSR() { return S_IWUSR; }
INLINE mode_t __hscore_S_IXUSR() { return S_IXUSR; }
INLINE mode_t __hscore_S_IFDIR() { return S_IFDIR; }
INLINE mode_t __hscore_S_IWUSR() { return S_IWUSR; }
INLINE mode_t __hscore_S_IXUSR() { return S_IXUSR; }
INLINE mode_t __hscore_S_IFDIR() { return S_IFDIR; }