From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 64185BC8B for ; Wed, 2 Feb 2005 16:08:32 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j12F8VLF015492 for ; Wed, 2 Feb 2005 16:08:32 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA22536 for ; Wed, 2 Feb 2005 16:08:31 +0100 (MET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j12F8UJ7015418 for ; Wed, 2 Feb 2005 16:08:31 +0100 Received: by wproxy.gmail.com with SMTP id 69so29196wra for ; Wed, 02 Feb 2005 07:08:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=B2lsFLXWZ4hw/xE7Hjli+SUDyClqqQZeqQo8Aqm5R9oBQ2cOSESLeRX+OUkfNubwnMPF7j+sC53iBvWtyKOOh9EHWoGrFOHoxyJItIxKAwlyGhaPtmnnXVNJYmZXLqLqk63RW2gG3w9CbKkNnmZkqxchZR3p0hhVS4dvQYGB5lI= Received: by 10.54.30.70 with SMTP id d70mr2500wrd; Wed, 02 Feb 2005 07:08:20 -0800 (PST) Received: by 10.54.31.22 with HTTP; Wed, 2 Feb 2005 07:08:20 -0800 (PST) Message-ID: <8008871f05020207085514849c@mail.gmail.com> Date: Wed, 2 Feb 2005 10:08:20 -0500 From: "Christopher A. Watford" Reply-To: "Christopher A. Watford" To: Christophe TROESTLER Subject: Re: [Caml-list] [WISH] Unix.fstat and symlinks for win32 Cc: Xavier.Leroy@inria.fr, caml-list@inria.fr In-Reply-To: <20050202.135208.106936180.Christophe.Troestler@umh.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050201.110702.30392529.Christophe.Troestler@umh.ac.be> <20050202095420.GA8040@yquem.inria.fr> <20050202.135208.106936180.Christophe.Troestler@umh.ac.be> X-Miltered: at nez-perce with ID 4200ECEF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4200ECEE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 fstat:01 symlinks:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 wrote:01 imho:01 ocamldoc:01 api:01 fstat:01 stdin:01 bool:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: On Wed, 02 Feb 2005 13:52:08 +0100 (CET), Christophe TROESTLER wrote: > Maybe the manual could be updated to reflect that? [IMHO, it would be > nice if the windows peculiarities were in the ocamldoc comments -- I > usually use ocamlbrowser...] > > > (I'm not even sure the latter is implementable at all with the > > Win32 API.) > > Windows gurus here? (My goal with fstat was to know whether stdin was > connected to a socket or a pipe.) HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); BOOL isPipe = ((hStdin != NULL && hStdin != INVALID_HANDLE_VALUE) ? GetNamedPipeInfo(hStdin, NULL, NULL, NULL, NULL) : FALSE); > Regards, > ChriS There is some dirty code to check if the handle for stdin is using named pipe functions or if it is using read/write file functions. Yep, horrible. -- Christopher A. Watford christopher.watford@gmail.com http://dorm.tunkeymicket.com