From: Christophe TROESTLER <Christophe.Troestler@umh.ac.be>
To: Xavier.Leroy@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] [WISH] Unix.fstat and symlinks for win32
Date: Wed, 02 Feb 2005 13:52:08 +0100 (CET) [thread overview]
Message-ID: <20050202.135208.106936180.Christophe.Troestler@umh.ac.be> (raw)
In-Reply-To: <20050202095420.GA8040@yquem.inria.fr>
On Wed, 2 Feb 2005, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:
>
> > Just a small note to tell that I think it would be nice to have
> > support for Unix.*stat on win32. Not all characteristics may make
> > sense but [file_kind], [st_size], [st_perm], [st_*time] do.
>
> Unix.stat is implemented under Windows (building on the _stati64()
> function provided by the MS C library) and sets the fields you
> mention to reasonable values.
Sorry for the confusion: I was interested in Unix.fstat and when
somebody told me it does not work on win32 (I do not use win32 myself
but try to write portable code whenever possible), I had a (too) quick
look at the manual which says that [lstat], [fstat] are not
implemented -- should not have put a star.
> Still under Windows (native Windows, not Cygwin), Unix.lstat behaves
> like Unix.stat and Unix.fstat is not implemented.
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.)
> > Also, why not treat *.lnk as symbolic links under win32?
>
> For the native Windows ports, I think this wouldn't fit the "spirit"
> of these ports, which is to remain relatively close to the semantics
> of the underlying OS (Windows) and provide Unix-like wrappers that
> are quite thin.
Thanks for the explanation. (Still there is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/ishelllink/ishelllink.asp
but I do not know whether it fits the bill or whether it is worth the
trouble.)
Regards,
ChriS
next prev parent reply other threads:[~2005-02-02 12:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-01 10:07 Christophe TROESTLER
2005-02-01 11:39 ` [Caml-list] " Marcin 'Qrczak' Kowalczyk
2005-02-01 12:38 ` Christophe TROESTLER
2005-02-01 14:19 ` Igor Pechtchanski
2005-02-02 9:54 ` Xavier Leroy
2005-02-02 12:52 ` Christophe TROESTLER [this message]
2005-02-02 15:08 ` Christopher A. Watford
2005-02-02 22:08 ` Robert Roessler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050202.135208.106936180.Christophe.Troestler@umh.ac.be \
--to=christophe.troestler@umh.ac.be \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox