From: simonpj Date: Wed, 15 Dec 2004 12:51:16 +0000 (+0000) Subject: [project @ 2004-12-15 12:51:15 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1343 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ab3e6dbac144c63bde23c833c7bfb99097130732;p=ghc-hetmet.git [project @ 2004-12-15 12:51:15 by simonpj] Make ghc/lib/compat/Compat/Directory.hs use the C function __compat_long_path_size, rather than __hscore_long_path_size, as the libraries/ version does And make ghc/lib/compat/cbits/directory.c define it. In this way we avoid spurious duplicate-symbol errors when we compile GHC with ghc6.2.1 etc. --- diff --git a/ghc/lib/compat/Compat/Directory.hs b/ghc/lib/compat/Compat/Directory.hs index 12c9d94..60f372a 100644 --- a/ghc/lib/compat/Compat/Directory.hs +++ b/ghc/lib/compat/Compat/Directory.hs @@ -57,7 +57,8 @@ foreign import stdcall unsafe "SHGetFolderPathA" -> CString -> IO CInt -foreign import ccall unsafe "__hscore_long_path_size" +-- __compat_long_path_size defined in cbits/directory.c +foreign import ccall unsafe "__compat_long_path_size" long_path_size :: Int foreign import ccall unsafe "__hscore_CSIDL_APPDATA" csidl_APPDATA :: CInt diff --git a/ghc/lib/compat/cbits/directory.c b/ghc/lib/compat/cbits/directory.c index 713911b..af3810c 100644 --- a/ghc/lib/compat/cbits/directory.c +++ b/ghc/lib/compat/cbits/directory.c @@ -24,9 +24,9 @@ * (PATH_MAX is not defined on systems with unlimited path length, * e.g. the Hurd). */ -INLINE HsInt __hscore_long_path_size() { return PATH_MAX; } +INLINE HsInt __compat_long_path_size() { return PATH_MAX; } #else -INLINE HsInt __hscore_long_path_size() { return 4096; } +INLINE HsInt __compat_long_path_size() { return 4096; } #endif #if defined(mingw32_TARGET_OS)