X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=include%2FHsDirectory.h;h=e5c4fb39211e6c03751707196056dd9b25013e35;hb=d9957206d51d2d6e5dc5378ab6c54280af4a3cfe;hp=3680378776cecbecde8ae8e51edd08a0c8d28746;hpb=4923376753ab1887fcce354e07cf012b82aefe2a;p=haskell-directory.git diff --git a/include/HsDirectory.h b/include/HsDirectory.h index 3680378..e5c4fb3 100644 --- a/include/HsDirectory.h +++ b/include/HsDirectory.h @@ -9,7 +9,17 @@ #ifndef __HSDIRECTORY_H__ #define __HSDIRECTORY_H__ +#ifdef __NHC__ +#include "Nhc98BaseConfig.h" +#else #include "HsDirectoryConfig.h" +#endif +// Otherwise these clash with similar definitions from other packages: +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #if HAVE_SYS_TYPES_H #include @@ -23,6 +33,10 @@ #include "HsFFI.h" +#if defined(__MINGW32__) +#include +#endif + #if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) extern int __hscore_getFolderPath(HWND hwndOwner, int nFolder, @@ -59,25 +73,14 @@ INLINE HsInt __hscore_long_path_size() { #endif } -#ifdef R_OK INLINE int __hscore_R_OK() { return R_OK; } -#endif -#ifdef W_OK INLINE int __hscore_W_OK() { return W_OK; } -#endif -#ifdef X_OK INLINE int __hscore_X_OK() { return X_OK; } -#endif -#ifdef S_IRUSR INLINE mode_t __hscore_S_IRUSR() { return S_IRUSR; } -#endif -#ifdef S_IWUSR INLINE mode_t __hscore_S_IWUSR() { return S_IWUSR; } -#endif -#ifdef S_IXUSR INLINE mode_t __hscore_S_IXUSR() { return S_IXUSR; } -#endif +INLINE mode_t __hscore_S_IFDIR() { return S_IFDIR; } #if defined(__MINGW32__)