{"thread":{"id":"20615","subject":"Re: [PATCH] Enable Visual Studio 2008 Build Git","startedAt":"2009-08-16T10:49:14Z","lastAt":"2009-08-16T10:49:14Z","messageCount":1,"participants":["Dmitry Potapov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"120762","messageId":"20090816104913.GA29884@dpotapov.dyndns.org","threadId":"20615","inReplyTo":null,"subject":"Re: [PATCH] Enable Visual Studio 2008 Build Git","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2009-08-16T10:49:14Z","receivedAt":"2009-08-16T10:49:14Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"Hi,\n\nIn addition to what Johannes wrote above, I have a few more remarks:\n\nOn Tue, Aug 04, 2009 at 11:53:38PM +0800, Frank Li wrote:\n> diff --git a/compat/mingw.c b/compat/mingw.c\n[...]\n> @@ -1011,7 +1021,9 @@ static sig_handler_t timer_fn = SIG_DFL;\n>   * But ticktack() interrupts the wait state after the timer's interval\n>   * length to call the signal handler.\n>   */\n> -\n> +#if defined(_MSC_VER)\n> +#define __stdcall\n> +#endif\n\nIt is a very dirty hack to change __stdcall in this way, and more\nimportantly, it is not clear why you did this.\n\n>  static __stdcall unsigned ticktack(void *dummy)\n\nAccordingly to MSDN:\nhttp://msdn.microsoft.com/en-us/library/kdzttdcb(VS.80).aspx\nThe routine given to _beginthreadex as the start address should be\neither __stdcall or  __clrcall.\n\n> --- /dev/null\n> +++ b/compat/vcbuild/libgit/libgit.vcproj\n[...]\n> +\t\t<Filter\n> +\t\t\tName=\"compat\"\n> +\t\t\t>\n> +\t\t\t<File\n> +\t\t\t\tRelativePath=\"..\\..\\..\\compat\\basename.c\"\n> +\t\t\t\t>\n> +\t\t\t</File>\n> +\t\t\t<File\n> +\t\t\t\tRelativePath=\"..\\..\\..\\compat\\cygwin.h\"\n> +\t\t\t\t>\n> +\t\t\t</File>\n\nI am not sure what cygwin.h is doing here.\n\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 9f941e4..3b683e6 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -87,7 +87,7 @@\n>  #include <assert.h>\n>  #include <regex.h>\n>  #include <utime.h>\n> -#ifndef __MINGW32__\n> +#if !defined(__MINGW32__) && !defined(_MSC_VER)\n\nIMHO, it should be:\n\n#ifndef _WIN32\n\nbecause it has nothing to do with a particular compiler but with the\ntarget platform. (Note: Cygwin GCC does not have _WIN32 defined, but\nMinGW GCC does, so it should not break anything.)\n\n\nDmitry\n"}]}