1 /* -----------------------------------------------------------------------------
3 * (c) The University of Glasgow 2001-2004
5 * Definitions for package `directory' which are visible in Haskell land.
7 * ---------------------------------------------------------------------------*/
9 #ifndef __HSDIRECTORY_H__
10 #define __HSDIRECTORY_H__
13 #include "Nhc98BaseConfig.h"
15 #include "HsDirectoryConfig.h"
17 // Otherwise these clash with similar definitions from other packages:
18 #undef PACKAGE_BUGREPORT
21 #undef PACKAGE_TARNAME
22 #undef PACKAGE_VERSION
29 #include <sys/types.h>
34 /* -----------------------------------------------------------------------------
37 These functions are given as inlines here for when compiling via C,
38 but we also generate static versions into the cbits library for
39 when compiling to native code.
40 -------------------------------------------------------------------------- */
43 # if defined(_MSC_VER)
44 # define INLINE extern __inline
46 # define INLINE static inline
50 /* A size that will contain many path names, but not necessarily all
51 * (PATH_MAX is not defined on systems with unlimited path length,
54 INLINE HsInt __hscore_long_path_size() {
62 INLINE mode_t __hscore_S_IRUSR() { return S_IRUSR; }
63 INLINE mode_t __hscore_S_IWUSR() { return S_IWUSR; }
64 INLINE mode_t __hscore_S_IXUSR() { return S_IXUSR; }
65 INLINE mode_t __hscore_S_IFDIR() { return S_IFDIR; }
67 #endif /* __HSDIRECTORY_H__ */