From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q1OFIBJL006644 for ; Fri, 24 Feb 2012 16:18:12 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiEDANqoR09RZ90xlGdsb2JhbABEsAKDBSIBAQEBCQsJCRQDJIF6CAIeEkwFaCMNAQ4BBB4Fh3qZWaAPjQsVGAECVAIDAQIChRYCBgICAQGEGASNVpEgiTQ X-IronPort-AV: E=Sophos;i="4.73,476,1325458800"; d="scan'208";a="132771888" Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by mail4-smtp-sop.national.inria.fr with ESMTP; 24 Feb 2012 16:18:06 +0100 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120224151803.QZDT10149.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Fri, 24 Feb 2012 15:18:03 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120224151803.OKAK13318.aamtaout03-winn.ispmail.ntl.com@romulus.metastack.com> for ; Fri, 24 Feb 2012 15:18:03 +0000 Received: from DIVA ([172.16.0.7]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id q1OFHxg1008735 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 24 Feb 2012 15:18:00 GMT From: "David Allsopp" To: "OCaml List" Date: Fri, 24 Feb 2012 15:17:59 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <000e01ccf307$7ef68eb0$7ce3ac10$@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AczzBr18hPwI6cK1Q9qT197qsh6B9Q== Content-Language: en-gb X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=il22NAY3qPIA:10 a=cTs9vV391PwA:10 a=V35hxywFhi8A:10 a=kj9zAlcOel0A:10 a=QwLuzy8VBGGl4_TzHOkA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Subject: [Caml-list] Windows problem with Unix.open_connection I'm in the process of eliminating any customisations I might have in place, but do any other Windows users get the following unexpected result with Unix.open_connection running MinGW-w64 OCaml 3.12.1? # let (i, o) = Unix.open_connection (Unix.ADDR_INET (Unix.inet_addr_of_string "173.194.67.104", 80));; val i : in_channel = val o : out_channel = # output_string o "GET HTTP/1.0\r\n\r\n";; - : unit = () # flush o;; Exception: Sys_error "Invalid argument". # input_line i;; Exception: Sys_error "Invalid argument". # close_out o;; WireShark confirms that a connection is correctly made to Google on port 80 by Unix.open_connection but something would appear to be seriously wrong with the handle translations in Unix.open_connection. David