Git development
 help / color / mirror / Atom feed
From: Dmitry Potapov <dpotapov@gmail.com>
To: Frank Li <lznuaa@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] Enable Visual Studio 2008 Build Git
Date: Sun, 16 Aug 2009 14:49:14 +0400	[thread overview]
Message-ID: <20090816104913.GA29884@dpotapov.dyndns.org> (raw)

Hi,

In addition to what Johannes wrote above, I have a few more remarks:

On Tue, Aug 04, 2009 at 11:53:38PM +0800, Frank Li wrote:
> diff --git a/compat/mingw.c b/compat/mingw.c
[...]
> @@ -1011,7 +1021,9 @@ static sig_handler_t timer_fn = SIG_DFL;
>   * But ticktack() interrupts the wait state after the timer's interval
>   * length to call the signal handler.
>   */
> -
> +#if defined(_MSC_VER)
> +#define __stdcall
> +#endif

It is a very dirty hack to change __stdcall in this way, and more
importantly, it is not clear why you did this.

>  static __stdcall unsigned ticktack(void *dummy)

Accordingly to MSDN:
http://msdn.microsoft.com/en-us/library/kdzttdcb(VS.80).aspx
The routine given to _beginthreadex as the start address should be
either __stdcall or  __clrcall.

> --- /dev/null
> +++ b/compat/vcbuild/libgit/libgit.vcproj
[...]
> +		<Filter
> +			Name="compat"
> +			>
> +			<File
> +				RelativePath="..\..\..\compat\basename.c"
> +				>
> +			</File>
> +			<File
> +				RelativePath="..\..\..\compat\cygwin.h"
> +				>
> +			</File>

I am not sure what cygwin.h is doing here.

> diff --git a/git-compat-util.h b/git-compat-util.h
> index 9f941e4..3b683e6 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -87,7 +87,7 @@
>  #include <assert.h>
>  #include <regex.h>
>  #include <utime.h>
> -#ifndef __MINGW32__
> +#if !defined(__MINGW32__) && !defined(_MSC_VER)

IMHO, it should be:

#ifndef _WIN32

because it has nothing to do with a particular compiler but with the
target platform. (Note: Cygwin GCC does not have _WIN32 defined, but
MinGW GCC does, so it should not break anything.)


Dmitry

                 reply	other threads:[~2009-08-16 10:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090816104913.GA29884@dpotapov.dyndns.org \
    --to=dpotapov@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=lznuaa@gmail.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