The attached patches add wrappers for utime and select.

Fixes 21 testsuite errors on NetBSD 5.99.

   /Krister
--- libraries/base/include/HsBase.h.orig        2009-08-02 10:40:13.000000000 
+0200
+++ libraries/base/include/HsBase.h     2009-08-02 10:56:17.000000000 +0200
@@ -251,6 +251,10 @@
 INLINE int
 __hscore_sigismember( sigset_t * set, int s )
 { return sigismember(set,s); }
+
+INLINE int
+__hscore_utime( const char *file, const struct utimbuf *timep )
+{ return utime(file,timep); }
 #endif
 
 // This is used by dph:Data.Array.Parallel.Arr.BUArr, and shouldn't be
@@ -670,6 +674,11 @@
 extern void hsFD_ZERO(fd_set *fds);
 #endif
 
+INLINE int __hscore_select(int nfds, fd_set *readfds, fd_set *writefds,
+                           fd_set *exceptfds, struct timeval *timeout) {
+       return (select(nfds,readfds,writefds,exceptfds,timeout));
+}
+
 // gettimeofday()-related
 
 #if !defined(__MINGW32__)
--- libraries/base/GHC/Conc.lhs.orig    2009-08-02 10:32:30.000000000 +0200
+++ libraries/base/GHC/Conc.lhs 2009-08-02 10:44:10.000000000 +0200
@@ -1251,7 +1251,7 @@
 
 data CFdSet
 
-foreign import ccall safe "select"
+foreign import ccall safe "__hscore_select"
   c_select :: CInt -> Ptr CFdSet -> Ptr CFdSet -> Ptr CFdSet -> Ptr CTimeVal
            -> IO CInt
 
--- libraries/base/System/Posix/Internals.hs.orig       2009-08-02 
10:51:47.000000000 +0200
+++ libraries/base/System/Posix/Internals.hs    2009-08-02 10:52:29.000000000 
+0200
@@ -457,7 +457,7 @@
 foreign import ccall unsafe "HsBase.h tcsetattr"
    c_tcsetattr :: CInt -> CInt -> Ptr CTermios -> IO CInt
 
-foreign import ccall unsafe "HsBase.h utime"
+foreign import ccall unsafe "HsBase.h __hscore_utime"
    c_utime :: CString -> Ptr CUtimbuf -> IO CInt
 
 foreign import ccall unsafe "HsBase.h waitpid"
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to