In local.glasgow-haskell-bugs, you wrote:
>>Perhaps, but I can't repeat the bug.  Your code fragment appears to work
>>fine here.  Which arch/OS, BTW?

The following withObject-modifications
will have to be applied in several places, I fear. If nobody objects
I'll wade through SocketPrim.hsc and send a complete diff tomorrow.
We (Michael & me) are not sure if that's Linux/glibc specific...
The older stuff surely *might* look broken in the rear view mirror.
        
--- SocketPrim.old      Thu Jun  7 16:29:47 2001
+++ SocketPrim.hsc      Thu Jun  7 16:30:26 2001
@@ -497,10 +497,9 @@
     
 getSocketName :: Socket -> IO SockAddr
 getSocketName (MkSocket s family _ _ _) = do
- withNewSockAddr family $ \ptr _ -> do
-   withObject 0 $ \int_star -> do
+ withNewSockAddr family $ \ptr sz -> do
+   withObject (fromIntegral sz) $ \int_star -> do
    throwErrnoIfMinus1Retry "getSocketName" $ c_getsockname s ptr int_star
-   sz <- peek int_star
    peekSockAddr ptr
-- 
Abstrakte Syntaxtr�ume.
Volker Stolz * [EMAIL PROTECTED] * PGP + S/MIME

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to