From 37bee7fd400d0abc6a460aaef03adc36583abe8f Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 20 May 2007 15:57:43 +0000 Subject: [PATCH] Rejig the #ifdeffery Put __hscore_?_OK and __hscore_S_I?USR in the C inside #ifdef __GLASGOW_HASKELL__ to match the foreign imports in the Haskell code. Don't check the constants are defined before defining the C functions, as we assume that the functions exist in the Haskell code anyway. --- include/HsDirectory.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/include/HsDirectory.h b/include/HsDirectory.h index 3680378..75c71c9 100644 --- a/include/HsDirectory.h +++ b/include/HsDirectory.h @@ -59,23 +59,13 @@ INLINE HsInt __hscore_long_path_size() { #endif } -#ifdef R_OK +#ifdef __GLASGOW_HASKELL__ 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 -- 1.7.10.4