From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id BC902BC6B for ; Tue, 18 Sep 2007 14:58:05 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHJo70bAXQInlGdsb2JhbACBWIw4AgIHBAYHCA X-IronPort-AV: E=Sophos;i="4.20,268,1186351200"; d="scan'208";a="16365344" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Sep 2007 14:59:11 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8ICwZnj015913 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 18 Sep 2007 14:58:35 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAHJo70bVhW6V/2dsb2JhbACBWA X-IronPort-AV: E=Sophos;i="4.20,268,1186351200"; d="scan'208";a="16365339" Received: from server2.thinkcrime.de ([213.133.110.149]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Sep 2007 14:59:07 +0200 Received: from hod-sarge-2005-10.lan.m-e-leypold.de (dslb-088-074-050-232.pools.arcor-ip.net [88.74.50.232]) (Authenticated sender: hod-sarge-2005-10@server2) by server2.thinkcrime.de (Postfix) with ESMTP id B29F1900249 for ; Tue, 18 Sep 2007 14:59:05 +0200 (CEST) Received: by hod-sarge-2005-10.lan.m-e-leypold.de (Postfix, from userid 1003) id F33AD37C38; Tue, 18 Sep 2007 15:03:40 +0200 (CEST) To: caml-list@inria.fr Subject: Re: [Caml-list] [ANN] coThreads 0.10 References: <87lkb5fe3f.fsf@pps.jussieu.fr> <20070918121041.6683b111.mle+ocaml@mega-nerd.com> <1190095167.22073.54.camel@rosella.wigram> <20070918162347.e04ac421.mle+ocaml@mega-nerd.com> From: Markus E L Organization: N/A Date: Tue, 18 Sep 2007 15:03:40 +0200 In-Reply-To: <20070918162347.e04ac421.mle+ocaml@mega-nerd.com> (Erik de Castro Lopo's message of "Tue, 18 Sep 2007 16:23:47 +1000") Message-ID: User-Agent: Some cool user agent (SCUG) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde with ID 46EFCB7B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; markus:01 errno:01 hackery:01 lseek:01 lseek:01 otherlibs:01 val:01 val:01 ofs:01 markus:01 0.10:98 wrote:01 wrote:01 unix:01 unix:01 Erik de Castro Lopo wrote: > skaller wrote: > >> But it isn't an errno value that is reported, it is the index >> of the variant that is 12, and that is "Invalid Argument". > > Ok. > >> It is not clear that a seek to an invalid position in the file >> is going to succeed. It's also not clear to me that the seek >> argument isn't 32 bits (depends on complex ugly GNU macro >> hackery what type off_t is .. my Caml got built with >> the LARGE_FILE macro thing so it should be 64 bits). > > Shouldn't off_t always be 64 bits on a 64 bit CPU? I only see > this problem on x86-64 and Sys.word_size is 64. This might be, or might be not. "The standard has nothing to say about this, but usually it's at least long int whatever that is at the corresponing platform. In contrast, I find in unix.ml external lseek : file_descr -> int -> seek_command -> int = "unix_lseek" but also in otherlibs/unix/lseek.c ret = lseek(Int_val(fd), Long_val(ofs), seek_command_table[Int_val(cmd)]); (see the Long_Val). Am I only imagining potential problems with variable width here? Regards -- Markus