X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=include%2FHsDirectory.h;h=608b3aa55266d946adb6bb2a87d0fc6da46bbc0c;hb=277a9e46ab403722488b4bee7958751195fe012d;hp=b74f069d310063a8d6cfcc69706256fa3ac6aec3;hpb=6c7b6c450f8a8a3f60ff124742f0c421742406f2;p=haskell-directory.git diff --git a/include/HsDirectory.h b/include/HsDirectory.h index b74f069..608b3aa 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 + +// On Solaris we have to make sure _FILE_OFFSET_BITS is defined +// before including below, because that header +// will try and define it if it isn't already. +#include "HsFFI.h" + #include "HsDirectoryConfig.h" +#endif // Otherwise these clash with similar definitions from other packages: #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME @@ -17,29 +27,15 @@ #undef PACKAGE_TARNAME #undef PACKAGE_VERSION -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_UNISTD_H -#include -#endif #if HAVE_SYS_STAT_H #include #endif -#include "HsFFI.h" - -#if defined(__MINGW32__) -#include +#if HAVE_SYS_TYPES_H +#include #endif -#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) -extern int __hscore_getFolderPath(HWND hwndOwner, - int nFolder, - HANDLE hToken, - DWORD dwFlags, - char* pszPath); -#endif +#include "HsFFI.h" /* ----------------------------------------------------------------------------- INLINE functions. @@ -69,38 +65,10 @@ INLINE HsInt __hscore_long_path_size() { #endif } -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_IRUSR() { return S_IRUSR; } 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; } -#if defined(__MINGW32__) - -/* Make sure we've got the reqd CSIDL_ constants in scope; - * w32api header files are lagging a bit in defining the full set. - */ -#if !defined(CSIDL_APPDATA) -#define CSIDL_APPDATA 0x001a -#endif -#if !defined(CSIDL_PERSONAL) -#define CSIDL_PERSONAL 0x0005 -#endif -#if !defined(CSIDL_PROFILE) -#define CSIDL_PROFILE 0x0028 -#endif -#if !defined(CSIDL_WINDOWS) -#define CSIDL_WINDOWS 0x0024 -#endif - -INLINE int __hscore_CSIDL_PROFILE() { return CSIDL_PROFILE; } -INLINE int __hscore_CSIDL_APPDATA() { return CSIDL_APPDATA; } -INLINE int __hscore_CSIDL_WINDOWS() { return CSIDL_WINDOWS; } -INLINE int __hscore_CSIDL_PERSONAL() { return CSIDL_PERSONAL; } -#endif - #endif /* __HSDIRECTORY_H__ */