From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 292A481799 for ; Sat, 27 Jul 2013 11:05:47 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of adrien@notk.org designates 91.121.71.147 as permitted sender) identity=mailfrom; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AisDADuN81FbeUeTgWdsb2JhbABagzuDX7pNgRYWDgEBFiYogiQBAQUjZgsYAgIFEw4CAg8FGIhYCKcvkS2BKI5cFoJNM28Dl14BgSmTOTo X-IPAS-Result: AisDADuN81FbeUeTgWdsb2JhbABagzuDX7pNgRYWDgEBFiYogiQBAQUjZgsYAgIFEw4CAg8FGIhYCKcvkS2BKI5cFoJNM28Dl14BgSmTOTo X-IronPort-AV: E=Sophos;i="4.89,756,1367964000"; d="scan'208";a="22412431" Received: from nautica.notk.org ([91.121.71.147]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 27 Jul 2013 11:05:46 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 44312C009; Sat, 27 Jul 2013 11:05:45 +0200 (CEST) Date: Sat, 27 Jul 2013 11:05:45 +0200 From: Adrien Nader To: caml-list@inria.fr Message-ID: <20130727090545.GA23130@notk.org> References: <20130727083844.GA17235@notk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130727083844.GA17235@notk.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] Re: portable truncate On Sat, Jul 27, 2013, Adrien Nader wrote: > Considering this, you should probably make a patch to add a file > win32unix/ftruncate.c which use the implementation above and replace the > implementation of ftruncate* in win32unix/unix.ml. > I don't know what is the purpose of the __CRT_NO_INLINE define; I've > already asked and will propagate the answer when I get it. It would be > good to have truncate*() too. > > (and submit it to the bug tracker :-) ) Actually, you should also check the return code and if an error has occured, check errno to raise the corresponding exception. As you can see, there is a variety of possible errors: http://msdn.microsoft.com/en-us/library/dk925tyb%28v=VS.80%29.aspx -- Adrien Nader