From c1180fec9f1121323b519ea86fd730b29f1b2f6d Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 21 Aug 2008 14:47:54 +0000 Subject: move some stuff here from System.Directory, now the dependencies are reversed --- include/HsUnix.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/HsUnix.h b/include/HsUnix.h index 4afd51a..5acdb74 100644 --- a/include/HsUnix.h +++ b/include/HsUnix.h @@ -10,6 +10,7 @@ #define HSUNIX_H #include "HsUnixConfig.h" +#include "HsFFI.h" /* ultra-evil... */ #undef PACKAGE_BUGREPORT @@ -200,4 +201,16 @@ INLINE int __hsunix_unsetenv(const char *name) #endif } +/* A size that will contain many path names, but not necessarily all + * (PATH_MAX is not defined on systems with unlimited path length, + * e.g. the Hurd). + */ +INLINE HsInt __hsunix_long_path_size() { +#ifdef PATH_MAX + return PATH_MAX; +#else + return 4096; +#endif +} + #endif -- cgit v1.2.3