Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] What's wrong with win32?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe TROESTLER <debian00@t...>
Subject: Re: [Caml-list] What's wrong with win32?
Ok, I reply to myself -- also to ask a subsequent question...

On Tue, 30 Mar 2004, Christophe TROESTLER <debian00@tiscali.be> wrote:
> 
>   let (ic, oc) = Unix.open_connection (Unix.ADDR_INET(addr, port)) in
>
> However, when I try to run it under windows 98 [...]
>   Fatal error: exception Sys_error("Bad file descriptor")

Ok, the trouble comes from the fact that Unix.open_connection uses
in_channel_of_descr of which the manual says

  in_channel_of_descr  does not work on sockets under Windows 95, 98, ME;
                       works fine under NT and 2000

Well, I tried the program under Win 2000 Professional and got the same
error...  Anyway, it would be nice that (1) open_connection be
mentionend in the manual as not working under win 9* or, even much
better, to make that (2) Unix.open_connection actually works under
win32!  IMHO it is quite unfortunate that in_channel_of_descr does not
work under windows for sockets since it basically forces the
programmer to reimplement input/output functions for these.

Is the current situation made for efficiency reasons (it is costly for
in/out channels to carry their type with them) or is there a deeper
problem with Win$ platforms?

Cheers,
ChriS

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners