use correct names of IOArray operations for nhc98
[haskell-directory.git] / System / Directory.hs
index ec4e5a7..bdd7f3c 100644 (file)
@@ -79,6 +79,11 @@ import NHC.FFI
 import Hugs.Directory
 #endif /* __HUGS__ */
 
+#if defined(__GLASGOW_HASKELL__) || defined(mingw32_HOST_OS)
+import Foreign
+import Foreign.C
+#endif
+
 #ifdef __GLASGOW_HASKELL__
 import Prelude
 
@@ -87,8 +92,6 @@ import System.Posix.Types
 import System.Posix.Internals
 import System.Time             ( ClockTime(..) )
 import System.IO
-import Foreign
-import Foreign.C
 
 import GHC.IOBase      ( IOException(..), IOErrorType(..), ioException )
 
@@ -588,7 +591,7 @@ findExecutable binary =
               return (Just fpath)
       else return Nothing
 
-foreign import stdcall unsafe "SearchPath"
+foreign import stdcall unsafe "SearchPathA"
             c_SearchPath :: CString
                          -> CString
                          -> CString
@@ -596,6 +599,10 @@ foreign import stdcall unsafe "SearchPath"
                          -> CString
                          -> Ptr CString
                          -> IO CInt
+# if !defined(__GLASGOW_HASKELL__)
+long_path_size :: Int
+long_path_size = 4096
+# endif
 #else
  do
   path <- getEnv "PATH"