git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Dmitry Potapov <dpotapov@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Marius Storm-Olsen <marius@trolltech.com>
Subject: Re: [PATCH] Add a fast version of fstat to cygwin port
Date: Thu, 19 Mar 2009 16:14:31 +0100	[thread overview]
Message-ID: <81b0412b0903190814i254ee2d1yc39035e78d7ad3d8@mail.gmail.com> (raw)
In-Reply-To: <49C25CAE.6000003@viscovery.net>

2009/3/19 Johannes Sixt <j.sixt@viscovery.net>:
> Alex Riesen schrieb:
>> BTW, why do we have to #undef fstat, but not stat/lstat?
>
> Because stat and lstat are #defined with an argument list, but in those
> instances where the cygwin version of stat/lstat is meant, they are used
> *without* argument list (see cygwin_stat/lstat_stub), and no macro
> expansion happens, and therefore we don't need to #undef the macro.
>
> OTOH, do_fstat calls into cygwin's fstat() if the file handle is not a
> file and uses an argument list that would cause a macro expansion if it
> were not #undef'd:
>
...
>> +     /* direct non-file handles to cygwin's fstat() */
>> +     if (GetFileType(fh) != FILE_TYPE_DISK)
>> +             return fstat(fd, buf);
>
> We never do that for stat/lstat.

I see. Not immediately obvious :)
Thanks!

      reply	other threads:[~2009-03-19 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19 14:30 [PATCH] Add a fast version of fstat to cygwin port Alex Riesen
2009-03-19 14:54 ` Johannes Sixt
2009-03-19 15:14   ` Alex Riesen [this message]

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=81b0412b0903190814i254ee2d1yc39035e78d7ad3d8@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=marius@trolltech.com \
    /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;
as well as URLs for NNTP newsgroup(s).