Commit ab3e6dba authored by simonpj's avatar simonpj
Browse files

[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.
parent 4fb581f4
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment