git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Roeland <marco.roeland@xs4all.nl>
To: Johannes Sixt <J.Sixt@eudaptics.com>
Cc: git@vger.kernel.org
Subject: Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista
Date: Thu, 16 Aug 2007 11:56:55 +0200	[thread overview]
Message-ID: <20070816095655.GA13069@fiberbit.xs4all.nl> (raw)
In-Reply-To: <46C40CB3.5415D888@eudaptics.com>

On Thursday August 16th 2007 at 10:37 Johannes Sixt wrote:

> I don't see how this could make a difference: __USE_MINGW_ACCESS appears
> in none of the mingw header files nor in the mingw.git sources.
> 
> Is my build environment outdated?

The mingw patch for fixing this Vista regression (from Danny Smith on
March 5th) is in mingw-runtime-3.12-1. It is in file <include/io.h> and
works like this:

#ifdef __USE_MINGW_ACCESS
/*  Old versions of MSVCRT access() just ignored X_OK, while the version
    shipped with Vista, returns an error code.  This will restore the
    old behaviour  */
static inline int __mingw_access (const char* __fname, int __mode)
  { return  _access (__fname, __mode & ~X_OK); }
#define access(__f,__m)  __mingw_access (__f, __m)
#endif

Whenever the X_OK bit is set in the mode flag for access(2) Vista
returns an error for the call. So yes, using __USE_MINGW_ACCESS will not
work on older mingw versions. Defining X_OK to 0 for mingw might fix the
problem for older versions.
-- 
Marco Roeland

      reply	other threads:[~2007-08-16 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-02  5:47 [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista Dmitry Kakurin
2007-08-02 10:33 ` Johannes Schindelin
2007-08-16  8:37 ` Johannes Sixt
2007-08-16  9:56   ` Marco Roeland [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=20070816095655.GA13069@fiberbit.xs4all.nl \
    --to=marco.roeland@xs4all.nl \
    --cc=J.Sixt@eudaptics.com \
    --cc=git@vger.kernel.org \
    /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).