Re: [PATCH] Enable Visual Studio 2008 Build Git

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:47:15

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:
quoted hunk
diff --git a/compat/mingw.c b/compat/mingw.c
[...]
quoted hunk
@@ -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.
quoted hunk
--- /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.
quoted hunk
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help