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"
16 // On Solaris we have to make sure _FILE_OFFSET_BITS is defined
17 // before including <sys/stat.h> below, because that header
18 // will try and define it if it isn't already.
21 #include "HsDirectoryConfig.h"
23 // Otherwise these clash with similar definitions from other packages:
24 #undef PACKAGE_BUGREPORT
27 #undef PACKAGE_TARNAME
28 #undef PACKAGE_VERSION
35 #include <sys/types.h>
40 /* -----------------------------------------------------------------------------
43 These functions are given as inlines here for when compiling via C,
44 but we also generate static versions into the cbits library for
45 when compiling to native code.
46 -------------------------------------------------------------------------- */
49 # if defined(_MSC_VER)
50 # define INLINE extern __inline
52 # define INLINE static inline
56 /* A size that will contain many path names, but not necessarily all
57 * (PATH_MAX is not defined on systems with unlimited path length,
60 INLINE HsInt __hscore_long_path_size() {
68 INLINE mode_t __hscore_S_IRUSR() { return S_IRUSR; }
69 INLINE mode_t __hscore_S_IWUSR() { return S_IWUSR; }
70 INLINE mode_t __hscore_S_IXUSR() { return S_IXUSR; }
71 INLINE mode_t __hscore_S_IFDIR() { return S_IFDIR; }
73 #endif /* __HSDIRECTORY_H__ */