git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Implementing stat() with FindFirstFile()

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Mar 30, 2009, 22:07 UTC
Message-ID
<20090330220709.GA68118@macbook.lan>
In-Reply-To
<20090330051118.GA2681@atjola.homenet>
On Mon, Mar 30, 2009 at 07:11:18AM +0200, Björn Steinbrink wrote:
Show 27 quoted lines
> On 2009.03.30 02:52:47 +0200, Johannes Schindelin wrote:
> > On Mon, 30 Mar 2009, Magnus Bäck wrote:
> > > On Friday, March 27, 2009 at 03:25 CET,
> > > Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > > On Thu, 26 Mar 2009, Magnus Bäck wrote:
> > > > > I'd be very surprised if ZwQueryDirectoryFile() hasn't always been
> > > > > around (I just verified ntdll.dll from NT 4.0), so that's not a
> > > > > worry. Don't know why MSDN reports it as introduced in XP.
> > > >
> > > > As the current maintainer of msysGit, I refuse to have something in
> > > > the installer I ship that relies on not-at-all guaranteed interfaces.
> > > 
> > > Although I do appreciate the importance of guaranteed interfaces,
> > > I am also pragmatic. An incompatible change in ntdll.dll would break
> > > vast amounts of programs, including cygwin. There is a lot to be said
> > > about Microsoft and their APIs, but I don't think they have a habit of
> > > changing ABIs or function semantics for userland libraries that have
> > > been around for 15 years.
> > 
> > Had you pointed to some document that states that the function has been in 
> > all NT-based versions, that would have done the trick.
> 
> Not official documentation, but at least from some MS guy it seems:
> http://www.osronline.com/showThread.cfm?link=73086 (last message).
> 
> Apparently, it was in NT3.x, but they document only what's actually
> defined in the header.

How about runtime checking? You could do GetProcAddress(...) and if you don't get it use the old behaviour. I mean if it really is faster why not let Users of recent systems benefit from it.

cheers Heiko
Previous: Björn SteinbrinkNext: Johannes Schindelin
Message 10 of 14 in “Implementing stat() with FindFirstFile()”
  1. Magnus BäckMar 21, 2009
  2. Johannes SixtMar 21, 2009
  3. Magnus BäckMar 24, 2009
  4. Johannes SixtMar 26, 2009
  5. Magnus BäckMar 26, 2009
  6. Johannes SchindelinMar 27, 2009
  7. Magnus BäckMar 29, 2009
  8. Johannes SchindelinMar 30, 2009
  9. Björn SteinbrinkMar 30, 2009
  10. Heiko VoigtMar 30, 2009
  11. Johannes SchindelinMar 30, 2009
  12. Magnus BäckMar 31, 2009
  13. Johannes SchindelinMar 31, 2009
  14. Nazri RamliyApr 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.