threads / patch / 20640

patch, 11 partsAdd miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment

Subject: [PATCH 06/11] Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment

## tl;dr

91 messages between Aug 17, 2009 and Aug 19, 2009. Diffs are folded; open one to read it.

replies: 90people: 15as markdown or json

Frank Li· Aug 17, 2009, 16:04 UTC · lore
Signed-off-by: Frank Li <lznuaa@gmail.com>
---
 compat/fnmatch/fnmatch.c |    4 ++++
 compat/regex/regex.c     |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
Show changes to 2 files +8 −0

compat/fnmatch/fnmatch.c, compat/regex/regex.c

diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c
index 14feac7..5cbd49c 100644
--- a/compat/fnmatch/fnmatch.c
+++ b/compat/fnmatch/fnmatch.c
@@ -16,6 +16,10 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif
+
 #if HAVE_CONFIG_H
 # include <config.h>
 #endif
diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index 5728de1..2298a3a 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -20,6 +20,10 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* AIX requires this to be the first thing in the file. */
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif
+
 #if defined (_AIX) && !defined (REGEX_MALLOC)
   #pragma alloca
 #endif
-- 
1.6.4.msysgit.0
Frank Li· Aug 17, 2009, 16:04 UTC · re: Frank Li · lore

[PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

Windows will convert CR\LF and union code at text mode. Git doesn't like this. Add O_BINARY flag to open function

Signed-off-by: Frank Li <lznuaa@gmail.com>
---
 compat/mingw.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to compat/mingw.c +2 −2
diff --git a/compat/mingw.c b/compat/mingw.c
index 75c74b1..d5fa0ed 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -132,7 +132,7 @@ int mingw_open (const char *filename, int oflags, ...)
 	if (!strcmp(filename, "/dev/null"))
 		filename = "nul";
 
-	fd = open(filename, oflags, mode);
+	fd = open(filename, oflags | O_BINARY, mode);
 
 	if (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {
 		DWORD attrs = GetFileAttributes(filename);
@@ -278,7 +278,7 @@ int mkstemp(char *template)
 	char *filename = mktemp(template);
 	if (filename == NULL)
 		return -1;
-	return open(filename, O_RDWR | O_CREAT, 0600);
+	return open(filename, O_RDWR | O_CREAT | O_BINARY, 0600);
 }
 
 int gettimeofday(struct timeval *tv, void *tz)
-- 
1.6.4.msysgit.0
Frank Li· Aug 17, 2009, 16:04 UTC · re: Frank Li · lore

[PATCH 08/11] Place __stdcall to correct position.

MSVC require __stdcall is between return value and function name. ALL Win32 API definition is as TYPE WINAPI function name

Signed-off-by: Frank Li <lznuaa@gmail.com>
---
 compat/mingw.c |    4 ++--
 run-command.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Show changes to 2 files +4 −4

compat/mingw.c, run-command.c

diff --git a/compat/mingw.c b/compat/mingw.c
index d5fa0ed..0c9c793 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1017,7 +1017,7 @@ static sig_handler_t timer_fn = SIG_DFL;
  * length to call the signal handler.
  */
 
-static __stdcall unsigned ticktack(void *dummy)
+static unsigned __stdcall ticktack(void *dummy)
 {
 	while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
 		if (timer_fn == SIG_DFL)
@@ -1146,7 +1146,7 @@ void mingw_open_html(const char *unixpath)
 
 int link(const char *oldpath, const char *newpath)
 {
-	typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
+	typedef  BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
 	static T create_hard_link = NULL;
 	if (!create_hard_link) {
 		create_hard_link = (T) GetProcAddress(
diff --git a/run-command.c b/run-command.c
index df139da..423b506 100644
--- a/run-command.c
+++ b/run-command.c
@@ -295,12 +295,12 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
 }
 
 #if defined(__MINGW32__) || defined(_MSC_VER)
-static __stdcall unsigned run_thread(void *data)
+static unsigned __stdcall run_thread(void *data)
 {
 	struct async *async = data;
 	return async->proc(async->fd_for_proc, async->data);
 }
-#endif
+#endif /* __MINGW32__ || _MSC_VER */
 
 int start_async(struct async *async)
 {
-- 
1.6.4.msysgit.0
Frank Li· Aug 17, 2009, 16:05 UTC · re: Frank Li · lore

[PATCH 09/11] Add MSVC porting header files.

Add unix head file, dirent.h, unistd.h and time.h Add MSVC special porting head file msvc.h and msvc.c.

Signed-off-by: Frank Li <lznuaa@gmail.com>
---
 compat/msvc.c                   |   33 ++++++++++
 compat/msvc.h                   |   95 +++++++++++++++++++++++++++++
 compat/vcbuild/include/dirent.h |  127 +++++++++++++++++++++++++++++++++++++++
 compat/vcbuild/include/unistd.h |   92 ++++++++++++++++++++++++++++
 compat/vcbuild/sys/time.h       |   21 +++++++
 git-compat-util.h               |   12 ++++-
 6 files changed, 379 insertions(+), 1 deletions(-)
 create mode 100644 compat/msvc.c
 create mode 100644 compat/msvc.h
 create mode 100644 compat/vcbuild/include/dirent.h
 create mode 100644 compat/vcbuild/include/unistd.h
 create mode 100644 compat/vcbuild/sys/time.h
Show changes to 6 files +379 −1

compat/msvc.c, compat/msvc.h, compat/vcbuild/include/dirent.h, compat/vcbuild/include/unistd.h, compat/vcbuild/sys/time.h, git-compat-util.h

diff --git a/compat/msvc.c b/compat/msvc.c
new file mode 100644
index 0000000..80afd4d
--- /dev/null
+++ b/compat/msvc.c
@@ -0,0 +1,33 @@
+#include "../git-compat-util.h"
+#include "win32.h"
+#include <conio.h>
+#include "../strbuf.h"
+
+DIR *opendir(const char *name)
+{
+	int len;
+	DIR *p;
+	p = (DIR*)malloc(sizeof(DIR));
+	memset(p, 0, sizeof(DIR));
+	strncpy(p->dd_name, name, PATH_MAX);
+	len = strlen(p->dd_name);
+	p->dd_name[len] = '/';
+	p->dd_name[len+1] = '*';
+
+	if (p == NULL)
+		return NULL;
+
+	p->dd_handle = _findfirst(p->dd_name, &p->dd_dta);
+
+	if (p->dd_handle == -1) {
+		free(p);
+		return NULL;
+	}
+	return p;
+}
+int closedir(DIR *dir)
+{
+	_findclose(dir->dd_handle);
+	free(dir);
+	return 0;
+}
diff --git a/compat/msvc.h b/compat/msvc.h
new file mode 100644
index 0000000..6071565
--- /dev/null
+++ b/compat/msvc.h
@@ -0,0 +1,95 @@
+#ifndef __MSVC__HEAD
+#define __MSVC__HEAD
+
+#define WINVER 0x0500
+#define _WIN32_WINNT 0x0500
+#define _WIN32_WINDOWS 0x0410
+#define _WIN32_IE 0x0700
+#define NTDDI_VERSION NTDDI_WIN2KSP1
+#include <winsock2.h>
+
+/*Configuration*/
+
+#define NO_PREAD
+#define NO_OPENSSL
+#define NO_LIBGEN_H
+#define NO_SYMLINK_HEAD
+#define NO_IPV6
+#define NO_SETENV
+#define NO_UNSETENV
+#define NO_STRCASESTR
+#define NO_STRLCPY
+#define NO_MEMMEM
+#define NO_C99_FORMAT
+#define NO_STRTOUMAX
+#define NO_MKDTEMP
+#define NO_MKSTEMPS
+
+#define RUNTIME_PREFIX
+#define NO_ST_BLOCKS_IN_STRUCT_STAT
+#define NO_NSEC
+#define USE_WIN32_MMAP
+#define USE_NED_ALLOCATOR
+
+#define NO_REGEX
+
+#define NO_SYS_SELECT_H
+#define NO_PTHEADS
+#define HAVE_STRING_H 1
+#define STDC_HEADERS
+#define NO_ICONV
+
+#define inline __inline
+#define __inline__ __inline
+
+#define SNPRINTF_RETURNS_BOGUS
+
+#define SHA1_HEADER "mozilla-sha1\\sha1.h"
+
+#define ETC_GITCONFIG "%HOME%"
+
+#define NO_PTHREADS
+#define NO_CURL
+
+
+#define NO_STRTOUMAX
+#define REGEX_MALLOC
+
+
+#define GIT_EXEC_PATH "bin"
+#define GIT_VERSION "1.6"
+#define BINDIR "bin"
+#define PREFIX "."
+#define GIT_MAN_PATH "man"
+#define GIT_INFO_PATH "info"
+#define GIT_HTML_PATH "html"
+#define DEFAULT_GIT_TEMPLATE_DIR "templates"
+
+#define NO_STRLCPY
+#define NO_UNSETENV
+#define NO_SETENV
+
+#define strdup _strdup
+#define read _read
+#define close _close
+#define dup _dup
+#define dup2 _dup2
+#define strncasecmp _strnicmp
+#define strtoull _strtoui64
+
+#define __attribute__(x)
+
+static __inline int strcasecmp (const char *s1, const char *s2)
+{
+	int size1=strlen(s1);
+	int sisz2=strlen(s2);
+
+	return _strnicmp(s1,s2,sisz2>size1?sisz2:size1);
+}
+
+#include "compat/mingw.h"
+#undef ERROR
+#undef stat
+#define stat(x,y) mingw_lstat
+#define stat      _stat64
+#endif
\ No newline at end of file
diff --git a/compat/vcbuild/include/dirent.h b/compat/vcbuild/include/dirent.h
new file mode 100644
index 0000000..a6b6f4c
--- /dev/null
+++ b/compat/vcbuild/include/dirent.h
@@ -0,0 +1,127 @@
+/*
+ * DIRENT.H (formerly DIRLIB.H)
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is a part of the mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within the package.
+ *
+ */
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+
+/* All the headers include this file. */
+//#include <_mingw.h>
+
+#include <io.h>
+
+#define PATH_MAX 512
+
+#define __MINGW_NOTHROW
+
+#ifndef RC_INVOKED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct dirent
+{
+	long		d_ino;		/* Always zero. */
+	unsigned short	d_reclen;	/* Always zero. */
+	unsigned short	d_namlen;	/* Length of name in d_name. */
+	char		d_name[FILENAME_MAX]; /* File name. */
+};
+
+/*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ * dd_stat field is now int (was short in older versions).
+ */
+typedef struct
+{
+	/* disk transfer area for this dir */
+	struct _finddata_t	dd_dta;
+
+	/* dirent struct to return from dir (NOTE: this makes this thread
+	 * safe as long as only one thread uses a particular DIR struct at
+	 * a time) */
+	struct dirent		dd_dir;
+
+	/* _findnext handle */
+	long			dd_handle;
+
+	/*
+         * Status of search:
+	 *   0 = not started yet (next entry to read is first entry)
+	 *  -1 = off the end
+	 *   positive = 0 based index of next entry
+	 */
+	int			dd_stat;
+
+	/* given path for dir with search pattern (struct is extended) */
+	char			dd_name[PATH_MAX+3];
+} DIR;
+
+DIR* __cdecl __MINGW_NOTHROW opendir (const char*);
+struct dirent* __cdecl __MINGW_NOTHROW readdir (DIR*);
+int __cdecl __MINGW_NOTHROW closedir (DIR*);
+void __cdecl __MINGW_NOTHROW rewinddir (DIR*);
+long __cdecl __MINGW_NOTHROW telldir (DIR*);
+void __cdecl __MINGW_NOTHROW seekdir (DIR*, long);
+
+
+/* wide char versions */
+
+struct _wdirent
+{
+	long		d_ino;		/* Always zero. */
+	unsigned short	d_reclen;	/* Always zero. */
+	unsigned short	d_namlen;	/* Length of name in d_name. */
+	wchar_t		d_name[FILENAME_MAX]; /* File name. */
+};
+
+/*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ */
+typedef struct
+{
+	/* disk transfer area for this dir */
+	//struct _wfinddata_t	dd_dta;
+
+	/* dirent struct to return from dir (NOTE: this makes this thread
+	 * safe as long as only one thread uses a particular DIR struct at
+	 * a time) */
+	struct _wdirent		dd_dir;
+
+	/* _findnext handle */
+	long			dd_handle;
+
+	/*
+         * Status of search:
+	 *   0 = not started yet (next entry to read is first entry)
+	 *  -1 = off the end
+	 *   positive = 0 based index of next entry
+	 */
+	int			dd_stat;
+
+	/* given path for dir with search pattern (struct is extended) */
+	wchar_t			dd_name[1];
+} _WDIR;
+
+
+
+_WDIR* __cdecl __MINGW_NOTHROW _wopendir (const wchar_t*);
+struct _wdirent*  __cdecl __MINGW_NOTHROW _wreaddir (_WDIR*);
+int __cdecl __MINGW_NOTHROW _wclosedir (_WDIR*);
+void __cdecl __MINGW_NOTHROW _wrewinddir (_WDIR*);
+long __cdecl __MINGW_NOTHROW _wtelldir (_WDIR*);
+void __cdecl __MINGW_NOTHROW _wseekdir (_WDIR*, long);
+
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* Not RC_INVOKED */
+
+#endif	/* Not _DIRENT_H_ */
diff --git a/compat/vcbuild/include/unistd.h b/compat/vcbuild/include/unistd.h
new file mode 100644
index 0000000..a0f59e6
--- /dev/null
+++ b/compat/vcbuild/include/unistd.h
@@ -0,0 +1,92 @@
+#ifndef _UNISTD_
+#define _UNISTD_
+
+/* Win32 define for porting git*/
+
+#ifndef _MODE_T_
+#define	_MODE_T_
+typedef unsigned short _mode_t;
+
+#ifndef	_NO_OLDNAMES
+typedef _mode_t	mode_t;
+#endif
+#endif	/* Not _MODE_T_ */
+
+#ifndef _SSIZE_T_
+#define _SSIZE_T_
+typedef long _ssize_t;
+
+#ifndef	_OFF_T_
+#define	_OFF_T_
+typedef long _off_t;
+
+#ifndef	_NO_OLDNAMES
+typedef _off_t	off_t;
+#endif
+#endif	/* Not _OFF_T_ */
+
+
+#ifndef	_NO_OLDNAMES
+typedef _ssize_t ssize_t;
+#endif
+#endif /* Not _SSIZE_T_ */
+
+typedef signed char int8_t;
+typedef unsigned char   uint8_t;
+typedef short  int16_t;
+typedef unsigned short  uint16_t;
+typedef int  int32_t;
+typedef unsigned   uint32_t;
+typedef long long  int64_t;
+typedef unsigned long long   uint64_t;
+
+typedef long long  intmax_t;
+typedef unsigned long long uintmax_t;
+
+typedef int64_t off64_t;
+
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Some defines for _access nAccessMode (MS doesn't define them, but
+ * it doesn't seem to hurt to add them). */
+#define	F_OK	0	/* Check for file existence */
+/* Well maybe it does hurt.  On newer versions of MSVCRT, an access mode
+   of 1 causes invalid parameter error. */ 
+#define	X_OK	0	/* MS access() doesn't check for execute permission. */
+#define	W_OK	2	/* Check for write permission */
+#define	R_OK	4	/* Check for read permission */
+
+#define	_S_IFIFO	0x1000	/* FIFO */
+#define	_S_IFCHR	0x2000	/* Character */
+#define	_S_IFBLK	0x3000	/* Block: Is this ever set under w32? */
+#define	_S_IFDIR	0x4000	/* Directory */
+#define	_S_IFREG	0x8000	/* Regular */
+
+#define	_S_IFMT		0xF000	/* File type mask */
+
+#define	_S_IXUSR	_S_IEXEC
+#define	_S_IWUSR	_S_IWRITE
+#define	_S_IRUSR	_S_IREAD
+#define	_S_ISDIR(m)	(((m) & _S_IFMT) == _S_IFDIR)
+
+#define	S_IFIFO		_S_IFIFO
+#define	S_IFCHR		_S_IFCHR
+#define	S_IFBLK		_S_IFBLK
+#define	S_IFDIR		_S_IFDIR
+#define	S_IFREG		_S_IFREG
+#define	S_IFMT		_S_IFMT
+#define	S_IEXEC		_S_IEXEC
+#define	S_IWRITE	_S_IWRITE
+#define	S_IREAD		_S_IREAD
+#define	S_IRWXU		_S_IRWXU
+#define	S_IXUSR		_S_IXUSR
+#define	S_IWUSR		_S_IWUSR
+#define	S_IRUSR		_S_IRUSR
+
+
+#define	S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
+#define	S_ISREG(m)	(((m) & S_IFMT) == S_IFREG)
+#define	S_ISFIFO(m)	(((m) & S_IFMT) == S_IFIFO)
+
+#endif
\ No newline at end of file
diff --git a/compat/vcbuild/sys/time.h b/compat/vcbuild/sys/time.h
new file mode 100644
index 0000000..6ed82c0
--- /dev/null
+++ b/compat/vcbuild/sys/time.h
@@ -0,0 +1,21 @@
+#ifndef	_UTIME_H_
+#define	_UTIME_H_
+/*
+ * Structure used by _utime function.
+ */
+struct _utimbuf
+{
+	time_t	actime;		/* Access time */
+	time_t	modtime;	/* Modification time */
+};
+
+#ifndef	_NO_OLDNAMES
+/* NOTE: Must be the same as _utimbuf above. */
+struct utimbuf
+{
+	time_t	actime;
+	time_t	modtime;
+};
+#endif	/* Not _NO_OLDNAMES */
+
+#endif
diff --git a/git-compat-util.h b/git-compat-util.h
index 9f941e4..cb89294 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -77,8 +77,10 @@
 #include <string.h>
 #include <errno.h>
 #include <limits.h>
+#ifndef _MSC_VER
 #include <sys/param.h>
 #include <sys/types.h>
+#endif
 #include <dirent.h>
 #include <sys/time.h>
 #include <time.h>
@@ -86,7 +88,12 @@
 #include <fnmatch.h>
 #include <assert.h>
 #include <regex.h>
+
+#ifndef _MSC_VER
 #include <utime.h>
+#endif
+
+#ifndef _MSC_VER
 #ifndef __MINGW32__
 #include <sys/wait.h>
 #include <sys/poll.h>
@@ -114,7 +121,10 @@
 #else 	/* __MINGW32__ */
 /* pull in Windows compatibility stuff */
 #include "compat/mingw.h"
-#endif	/* __MINGW32__ */
+#endif  /* __MINGW32__ */
+#else   /* _MSC_VER */
+#include "compat/msvc.h"
+#endif	/* _MSC_VER */
 
 #ifndef NO_LIBGEN_H
 #include <libgen.h>
-- 
1.6.4.msysgit.0
Frank Li· Aug 17, 2009, 16:05 UTC · re: Frank Li · lore

[PATCH 10/11] Add MSVC Project file

Add libgit.vcproj to build common library. Add git.vcproj to build git program.

Signed-off-by: Frank Li <lznuaa@gmail.com>
---
 compat/vcbuild/git/git.vcproj       |  197 +++++
 compat/vcbuild/libgit/libgit.vcproj | 1347 +++++++++++++++++++++++++++++++++++
 2 files changed, 1544 insertions(+), 0 deletions(-)
 create mode 100644 compat/vcbuild/git/git.vcproj
 create mode 100644 compat/vcbuild/libgit/libgit.vcproj
Show changes to 2 files +1544 −0

compat/vcbuild/git/git.vcproj, compat/vcbuild/libgit/libgit.vcproj

diff --git a/compat/vcbuild/git/git.vcproj b/compat/vcbuild/git/git.vcproj
new file mode 100644
index 0000000..6f85de3
--- /dev/null
+++ b/compat/vcbuild/git/git.vcproj
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="git"
+	ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
+	RootNamespace="git"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wininet.lib ws2_32.lib "
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wininet.lib ws2_32.lib "
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\..\git.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/compat/vcbuild/libgit/libgit.vcproj b/compat/vcbuild/libgit/libgit.vcproj
new file mode 100644
index 0000000..bbc3aed
--- /dev/null
+++ b/compat/vcbuild/libgit/libgit.vcproj
@@ -0,0 +1,1347 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="libgit"
+	ProjectGUID="{F6DEC8C3-B803-4A86-8848-430F08B499E3}"
+	RootNamespace="libgit"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\msvc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\mozilla-sha1\sha1.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\..\archive.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\attr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\blob.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\branch.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\bundle.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\cache-tree.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\cache.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\color.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\commit.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\csum-file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\decorate.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\delta.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diff.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diffcore.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\dir.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\exec_cmd.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\fetch-pack.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\fsck.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\git-compat-util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\graph.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\grep.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\hash.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\help.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\http.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\levenshtein.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\list-objects.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\ll-merge.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\log-tree.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\mailmap.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\merge-recursive.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\notes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\object.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack-refs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack-revindex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\parse-options.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\patch-ids.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pkt-line.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\progress.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\quote.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\reachable.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\reflog-walk.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\refs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\remote.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\rerere.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\revision.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\run-command.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\send-pack.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sha1-lookup.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\shortlog.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sideband.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sigchain.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\strbuf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\string-list.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tag.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tar.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\thread-utils.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\transport.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tree-walk.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tree.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\unpack-trees.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\userdiff.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\utf8.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\walker.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\wt-status.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff-interface.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+		<Filter
+			Name="compat"
+			>
+			<File
+				RelativePath="..\..\..\compat\basename.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\cygwin.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\fnmatch\fnmatch.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\fnmatch\fnmatch.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\fopen.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\memmem.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\mingw.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\mingw.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\mkdtemp.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\mkstemps.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\pread.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\qsort.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\regex\regex.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\regex\regex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\setenv.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\snprintf.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\strcasestr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\strlcpy.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\strtoumax.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\unsetenv.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\win32.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\win32mmap.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compat\winansi.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="git"
+			>
+			<File
+				RelativePath="..\..\..\abspath.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\alias.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\alloc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\archive-tar.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\archive-zip.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\archive.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\attr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\base85.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\bisect.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\blob.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\branch.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-add.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-annotate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-apply.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-archive.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-bisect--helper.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-blame.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-branch.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-bundle.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-cat-file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-check-attr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-check-ref-format.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-checkout-index.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-checkout.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-clean.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-clone.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-commit-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-commit.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-config.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-count-objects.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-describe.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-diff-files.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-diff-index.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-diff-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-diff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-fast-export.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-fetch--tool.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-fetch-pack.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-fetch.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-fmt-merge-msg.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-for-each-ref.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-fsck.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-gc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-grep.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-help.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-init-db.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-log.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-ls-files.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-ls-remote.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-ls-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-mailinfo.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-mailsplit.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-merge-base.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-merge-file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-merge-ours.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-merge-recursive.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-merge.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-mktree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-mv.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-name-rev.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-pack-objects.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-pack-refs.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-prune-packed.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-prune.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-push.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-read-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-receive-pack.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-reflog.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-remote.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-rerere.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-reset.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-rev-list.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-rev-parse.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-revert.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-rm.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-send-pack.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-shortlog.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-show-branch.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-show-ref.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-stripspace.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-symbolic-ref.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-tag.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-tar-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-unpack-objects.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-update-index.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-update-ref.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-upload-archive.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-verify-pack.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-verify-tag.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\builtin-write-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\bundle.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\cache-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\color.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\combine-diff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\commit.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\config.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\connect.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\convert.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\copy.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\csum-file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\ctype.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\date.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\decorate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diff-delta.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diff-lib.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diff-no-index.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diffcore-break.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diffcore-delta.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diffcore-order.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diffcore-pickaxe.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\diffcore-rename.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\dir.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\editor.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\entry.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\environment.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\exec_cmd.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\fsck.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\graph.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\grep.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\hash.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\help.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\ident.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\levenshtein.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\list-objects.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\ll-merge.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\lockfile.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\log-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\mailmap.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\match-trees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\merge-file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\merge-recursive.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\merge-tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\name-hash.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\object.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack-check.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack-refs.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack-revindex.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pack-write.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pager.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\parse-options.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\patch-delta.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\patch-ids.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\path.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pkt-line.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\preload-index.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\pretty.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\progress.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\quote.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\reachable.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\read-cache.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\reflog-walk.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\refs.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\remote.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\rerere.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\revision.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\run-command.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\server-info.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\setup.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sha1-lookup.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sha1_file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sha1_name.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\shallow.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sideband.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\sigchain.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\strbuf.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\string-list.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\symlinks.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tag.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\thread-utils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\trace.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\transport.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tree-diff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tree-walk.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\tree.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\unpack-trees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\usage.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\userdiff.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\utf8.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\walker.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\wrapper.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\write_or_die.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\ws.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\wt-status.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff-interface.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="xdiff"
+			>
+			<File
+				RelativePath="..\..\..\xdiff\xdiff.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xdiffi.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xdiffi.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xemit.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xemit.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xinclude.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xmacros.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xmerge.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xpatience.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xprepare.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xprepare.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xtypes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xutils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\xdiff\xutils.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
-- 
1.6.4.msysgit.0
Johannes Schindelin· Aug 17, 2009, 17:11 UTC · re: Frank Li · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
> Add libgit.vcproj to build common library.
> Add git.vcproj to build git program.
> 
> Signed-off-by: Frank Li <lznuaa@gmail.com>
The commit subject should read "... files", as you add two files, not one.
I hope that somebody else is going to review this patch...
And don't you lack .vcproj files for the non-builtins?

Ciao, Dscho

Paolo Bonzini· Aug 17, 2009, 17:34 UTC · re: Frank Li · lore

Re: [PATCH 10/11] Add MSVC Project file

I don't know if this is in any way feasible (does not seem to hard actually), but I think these files should be automatically generated.

Otherwise, bitrot is going to happen in zero time.
Also, a cleaner XML without verbosities like

+ <Tool + Name="VCMIDLTool" + />

would make the patch easier to review.
I agree with dscho on the non-builtins.
Paolo
Erik Faye-Lund· Aug 17, 2009, 17:40 UTC · re: Paolo Bonzini · lore

Re: [PATCH 10/11] Add MSVC Project file

On Mon, Aug 17, 2009 at 7:34 PM, Paolo Bonzini<bonzini@gnu.org> wrote:
Show 7 quoted lines
> Also, a cleaner XML without verbosities like
>
> +                       <Tool
> +                               Name="VCMIDLTool"
> +                       />
>
> would make the patch easier to review.

...but will it make it more annoying to maintain in the long run? It might be painful to work with a mixture of hand-written and msdev-written XML. Of course, if we get some scripts in place to generate the vcproj-files this might not be a problem...

-- 
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
Paolo Bonzini· Aug 17, 2009, 18:16 UTC · re: Erik Faye-Lund · lore

Re: [PATCH 10/11] Add MSVC Project file

On 08/17/2009 07:40 PM, Erik Faye-Lund wrote:
Show 13 quoted lines
> On Mon, Aug 17, 2009 at 7:34 PM, Paolo Bonzini<bonzini@gnu.org>  wrote:
>> Also, a cleaner XML without verbosities like
>>
>> +<Tool
>> +                               Name="VCMIDLTool"
>> +                       />
>>
>> would make the patch easier to review.
>
> ...but will it make it more annoying to maintain in the long run? It
> might be painful to work with a mixture of hand-written and
> msdev-written XML. Of course, if we get some scripts in place to
> generate the vcproj-files this might not be a problem...

Yes, my remark applied only if the generation was scripted. Otherwise, it would be an annoyance in addition to being subject to bitrot.

Paolo
Johannes Schindelin· Aug 17, 2009, 19:53 UTC · re: Erik Faye-Lund · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Erik Faye-Lund wrote:
Show 13 quoted lines
> On Mon, Aug 17, 2009 at 7:34 PM, Paolo Bonzini<bonzini@gnu.org> wrote:
> > Also, a cleaner XML without verbosities like
> >
> > +                       <Tool
> > +                               Name="VCMIDLTool"
> > +                       />
> >
> > would make the patch easier to review.
> 
> ...but will it make it more annoying to maintain in the long run? It 
> might be painful to work with a mixture of hand-written and 
> msdev-written XML. Of course, if we get some scripts in place to 
> generate the vcproj-files this might not be a problem...

I think the killer argument against such a script (I actually though of that myself, but decided against it for that very reason) is that the result is to be used by Microsoft Visual Studio users, who do not typically have a scripting language, and who would not want to use it anyway.

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some. Should not be too hard in Perl.

Ciao, Dscho

Paolo Bonzini· Aug 17, 2009, 20:02 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

Show 5 quoted lines
> I think the killer argument against such a script (I actually though of 
> that myself, but decided against it for that very reason) is that the 
> result is to be used by Microsoft Visual Studio users, who do not 
> typically have a scripting language, and who would not want to use it 
> anyway.

But the script could run whenever the Makefile is updated, even under Unix. Of course, there are chances of bitrotting, but it cannot be worse than having failures every time a builtin is added or otherwise a file is added.

The main problem I see with the script is that the output would naturally be a .gitignore-d file, but it will not be for the reason you mention.

Show 5 quoted lines
> Of course, we could have a script that verifies that the .vcproj files 
> contain reference the appropriate files (which it would know about by 
> being called from the Makefile and being passed the file names), maybe 
> even be able to edit the .vcproj file if it is missing some.  Should not 
> be too hard in Perl.
Yes, it's not very far from what I had in mind.
Paolo
Johannes Schindelin· Aug 17, 2009, 20:54 UTC · re: Paolo Bonzini · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Paolo Bonzini wrote:
Show 8 quoted lines
> > I think the killer argument against such a script (I actually though 
> > of that myself, but decided against it for that very reason) is that 
> > the result is to be used by Microsoft Visual Studio users, who do not 
> > typically have a scripting language, and who would not want to use it 
> > anyway.
> 
> But the script could run whenever the Makefile is updated, even under 
> Unix.

But that would have to be kept in mind by the maintainer, and he could not test it.

Besides, IIUC you were proposing a generator, while I suggested a rewriter. My idea would require much less work, as the changes to the original, known good, .vcproj are minimal.

So let's have a script (if anybody feels compelled enough) that we can run from time to time and when it updates at least one of the .vcproj file, we throw the result at Frank Li for testing.

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 20:17 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

On Mon, Aug 17, 2009 at 9:53 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 5 quoted lines
> Of course, we could have a script that verifies that the .vcproj files
> contain reference the appropriate files (which it would know about by
> being called from the Makefile and being passed the file names), maybe
> even be able to edit the .vcproj file if it is missing some.  Should not
> be too hard in Perl.
You'll need to special-case for Visual C++ 2010, which is different
and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the
user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything
else.
-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Reece Dunn· Aug 17, 2009, 20:43 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
Show 14 quoted lines
> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>
>> Of course, we could have a script that verifies that the .vcproj files
>> contain reference the appropriate files (which it would know about by
>> being called from the Makefile and being passed the file names), maybe
>> even be able to edit the .vcproj file if it is missing some.  Should not
>> be too hard in Perl.
>
> You'll need to special-case for Visual C++ 2010, which is different
> and incompatible with previous versions. Hence my suggestion for
> CMake: appropriate project files would be generated for the tool the
> user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything
> else.

The problem is that you'd still need the Visual Studio projects (one each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- yes, there'll need to be one for each version of Visual Studio) as people who use Visual Studio tend to primarily use the IDE. CMake (which Windows users will need to download & install from somewhere) will sit outside this -- unless you mean making the project files be the "Makefile project" type and simply use it to invoke CMake and host the source files to ease access to them from the IDE?

Also, not every posix system will have CMake installed (e.g. Linux From Scratch systems) and that's not including "exotic" systems like Solaris and the *BSDs.

- Reece
Pau Garcia i Quiles· Aug 17, 2009, 20:54 UTC · re: Reece Dunn · lore

Re: [PATCH 10/11] Add MSVC Project file

On Mon, Aug 17, 2009 at 10:43 PM, Reece Dunn<msclrhd@googlemail.com> wrote:
Show 24 quoted lines
> 2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
>> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
>> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>>
>>> Of course, we could have a script that verifies that the .vcproj files
>>> contain reference the appropriate files (which it would know about by
>>> being called from the Makefile and being passed the file names), maybe
>>> even be able to edit the .vcproj file if it is missing some.  Should not
>>> be too hard in Perl.
>>
>> You'll need to special-case for Visual C++ 2010, which is different
>> and incompatible with previous versions. Hence my suggestion for
>> CMake: appropriate project files would be generated for the tool the
>> user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything
>> else.
>
> The problem is that you'd still need the Visual Studio projects (one
> each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) --
> yes, there'll need to be one for each version of Visual Studio) as
> people who use Visual Studio tend to primarily use the IDE. CMake
> (which Windows users will need to download & install from somewhere)
> will sit outside this -- unless you mean making the project files be
> the "Makefile project" type and simply use it to invoke CMake and host
> the source files to ease access to them from the IDE?

If a CMake build system is provided, you will not need a single Visual Studio project, or the autotools build system, or anything else. Just CMake and the CMake build system (which are a bunch of CMakeLists.txt plain text files).

CMake takes the CMakeLists.txt file(s) as the input and generates makefiles for gcc, vcproj files for Visual C++, makefiles for NMake, Eclipse projects for Eclipse, XCode projects for XCode, etc.

> Also, not every posix system will have CMake installed (e.g. Linux
> From Scratch systems) and that's not including "exotic" systems like
> Solaris and the *BSDs.

CMake is available for many platforms (Linux x86-32 and x86-64, PPC, Solaris Sparc, HP-UX, Irix, AIX PPC) as a binary from the CMake site ( http://cmake.org/cmake/resources/software.html ) and as source for the rest.

*BSD? It is available in the ports section (and maybe as a binary, too) in FreeBSD( http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/cmake/ ), NetBSD and OpenBSD.

Linux from scratch? If people are brave enough to build and use LFS, they are brave enough to build CMake (CMake is autocontained and bootstraps itself, it only depends on a C++ compiler to build itself).

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Reece Dunn· Aug 17, 2009, 21:05 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
Show 30 quoted lines
> On Mon, Aug 17, 2009 at 10:43 PM, Reece Dunn<msclrhd@googlemail.com> wrote:
>> 2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
>>> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
>>> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>>>
>>>> Of course, we could have a script that verifies that the .vcproj files
>>>> contain reference the appropriate files (which it would know about by
>>>> being called from the Makefile and being passed the file names), maybe
>>>> even be able to edit the .vcproj file if it is missing some.  Should not
>>>> be too hard in Perl.
>>>
>>> You'll need to special-case for Visual C++ 2010, which is different
>>> and incompatible with previous versions. Hence my suggestion for
>>> CMake: appropriate project files would be generated for the tool the
>>> user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything
>>> else.
>>
>> The problem is that you'd still need the Visual Studio projects (one
>> each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) --
>> yes, there'll need to be one for each version of Visual Studio) as
>> people who use Visual Studio tend to primarily use the IDE. CMake
>> (which Windows users will need to download & install from somewhere)
>> will sit outside this -- unless you mean making the project files be
>> the "Makefile project" type and simply use it to invoke CMake and host
>> the source files to ease access to them from the IDE?
>
> If a CMake build system is provided, you will not need a single Visual
> Studio project, or the autotools build system, or anything else. Just
> CMake and the CMake build system (which are a bunch of CMakeLists.txt
> plain text files).

Note that I said that people who use Visual Studio are more likely to build and develop things through the Visual Studio IDE. Unless there is IDE integration for it, they are not likely to use it.

For an automated build, CMake would probably work.

Looking around, it seems that CMake on Windows assumes that Microsoft Visual C is used; that is, you have to explicitly specify CC for MinGW or cygwin to build.

Show 17 quoted lines
> CMake takes the CMakeLists.txt file(s) as the input and generates
> makefiles for gcc, vcproj files for Visual C++, makefiles for NMake,
> Eclipse projects for Eclipse, XCode projects for XCode, etc.
>
>> Also, not every posix system will have CMake installed (e.g. Linux
>> From Scratch systems) and that's not including "exotic" systems like
>> Solaris and the *BSDs.
>
> CMake is available for many platforms (Linux x86-32 and x86-64, PPC,
> Solaris Sparc, HP-UX, Irix, AIX PPC) as a binary from the CMake site (
> http://cmake.org/cmake/resources/software.html ) and as source for the
> rest.
>
> *BSD? It is available in the ports section (and maybe as a binary,
> too) in FreeBSD(
> http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/cmake/ ), NetBSD and
> OpenBSD.
Ok, I stand corrected there.
> Linux from scratch? If people are brave enough to build and use LFS,
> they are brave enough to build CMake (CMake is autocontained and
> bootstraps itself, it only depends on a C++ compiler to build itself).

At what about at the bootstrap stage? A C compiler will be available, but a C++ one may not.

- Reece
Johan 't Hart· Aug 17, 2009, 22:17 UTC · re: Reece Dunn · lore

Re: [PATCH 10/11] Add MSVC Project file

Reece Dunn schreef:
> Note that I said that people who use Visual Studio are more likely to
> build and develop things through the Visual Studio IDE. Unless there
> is IDE integration for it, they are not likely to use it.

CMake generates a .vcproj file for visual studio, so users who want to use the IDE let CMake generate the .vcproj file and then use the IDE to debug git. There could be a batchfile like /vc_build/make_vs_files.bat or something to make it easy for VS users using the IDE.

Johannes Schindelin· Aug 17, 2009, 21:05 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
Show 30 quoted lines
> On Mon, Aug 17, 2009 at 10:43 PM, Reece Dunn<msclrhd@googlemail.com> wrote:
> > 2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
> >> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
> >> Schindelin<Johannes.Schindelin@gmx.de> wrote:
> >>
> >>> Of course, we could have a script that verifies that the .vcproj 
> >>> files contain reference the appropriate files (which it would know 
> >>> about by being called from the Makefile and being passed the file 
> >>> names), maybe even be able to edit the .vcproj file if it is missing 
> >>> some.  Should not be too hard in Perl.
> >>
> >> You'll need to special-case for Visual C++ 2010, which is different 
> >> and incompatible with previous versions. Hence my suggestion for 
> >> CMake: appropriate project files would be generated for the tool the 
> >> user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything 
> >> else.
> >
> > The problem is that you'd still need the Visual Studio projects (one 
> > each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- 
> > yes, there'll need to be one for each version of Visual Studio) as 
> > people who use Visual Studio tend to primarily use the IDE. CMake 
> > (which Windows users will need to download & install from somewhere) 
> > will sit outside this -- unless you mean making the project files be 
> > the "Makefile project" type and simply use it to invoke CMake and host 
> > the source files to ease access to them from the IDE?
> 
> If a CMake build system is provided, you will not need a single Visual 
> Studio project, or the autotools build system, or anything else. Just 
> CMake and the CMake build system (which are a bunch of CMakeLists.txt 
> plain text files).
You are putting an undue burden on the already overloaded maintainer.

Well, let's see if you can provide a /src/cmake/release.sh that compiles CMake from scratch, and _then_ I'll look into CMake again.

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 21:23 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

On Mon, Aug 17, 2009 at 11:05 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 36 quoted lines
> Hi,
>
> On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
>
>> On Mon, Aug 17, 2009 at 10:43 PM, Reece Dunn<msclrhd@googlemail.com> wrote:
>> > 2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
>> >> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
>> >> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>> >>
>> >>> Of course, we could have a script that verifies that the .vcproj
>> >>> files contain reference the appropriate files (which it would know
>> >>> about by being called from the Makefile and being passed the file
>> >>> names), maybe even be able to edit the .vcproj file if it is missing
>> >>> some.  Should not be too hard in Perl.
>> >>
>> >> You'll need to special-case for Visual C++ 2010, which is different
>> >> and incompatible with previous versions. Hence my suggestion for
>> >> CMake: appropriate project files would be generated for the tool the
>> >> user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything
>> >> else.
>> >
>> > The problem is that you'd still need the Visual Studio projects (one
>> > each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) --
>> > yes, there'll need to be one for each version of Visual Studio) as
>> > people who use Visual Studio tend to primarily use the IDE. CMake
>> > (which Windows users will need to download & install from somewhere)
>> > will sit outside this -- unless you mean making the project files be
>> > the "Makefile project" type and simply use it to invoke CMake and host
>> > the source files to ease access to them from the IDE?
>>
>> If a CMake build system is provided, you will not need a single Visual
>> Studio project, or the autotools build system, or anything else. Just
>> CMake and the CMake build system (which are a bunch of CMakeLists.txt
>> plain text files).
>
> You are putting an undue burden on the already overloaded maintainer.
Sorry, but I'm a bit lost now. What maintainer are we talking about now? Junio?

As I would be providing a turn-key CMake build system, the only burden I would be putting on the maintainer would be learning CMake.

Given that I'm providing a comprehensive (100+ slides) CMake tutorial ( http://www.elpauer.org/stuff/learning_cmake.pdf ) , which I use in my CMake workshops, I think I'm making that burden a bit lighter.

If the next git conference is somewhere in Europe, I could also fly there and we'd have a CMake tutorial, if people would feel more comfortable that way.

> Well, let's see if you can provide a /src/cmake/release.sh that compiles
> CMake from scratch, and _then_ I'll look into CMake again.

Again, I'm a bit lost. What '/src/cmake/release.sh' are we talking about now? Would that be part of CMake or git ?

If you want to build CMake from scratch, you only need to download the source from http://cmake.org/cmake/resources/software.html , then run "./bootstrap" in the source directory. That's true for every platform but Visual C++, which requires you to download a pre-built CMake binary to build CMake.

If you mean you want to bootstrap git (i. e. download the git tarball, which would include the CMake sources, then bootstrap CMake, then build git using the CMake build system), I'd say that makes no sense at all. That would be like saying you want to include the autotools sources, the OpenSSL sources, the curl sources, the Subversion sources, etc in the git tarball. Insane.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Schindelin· Aug 17, 2009, 22:10 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
Show 7 quoted lines
> On Mon, Aug 17, 2009 at 11:05 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>
> > You are putting an undue burden on the already overloaded maintainer.
> 
> Sorry, but I'm a bit lost now. What maintainer are we talking about now? 
> Junio?
I was talking about me, as maintainer of msysGit.
Show 10 quoted lines
> As I would be providing a turn-key CMake build system, the only burden I 
> would be putting on the maintainer would be learning CMake.
> 
> Given that I'm providing a comprehensive (100+ slides) CMake tutorial
> ( http://www.elpauer.org/stuff/learning_cmake.pdf ) , which I use in
> my CMake workshops, I think I'm making that burden a bit lighter.
> 
> If the next git conference is somewhere in Europe, I could also fly
> there and we'd have a CMake tutorial, if people would feel more
> comfortable that way.

This is exactly what I mean by burden. Why do I have to learn a new system, and suffer the hassle of integrating it into the current build system, which works quite well thankyouverymuch?

Never run a changing system.
Show 5 quoted lines
> > Well, let's see if you can provide a /src/cmake/release.sh that 
> > compiles CMake from scratch, and _then_ I'll look into CMake again.
> 
> Again, I'm a bit lost. What '/src/cmake/release.sh' are we talking about 
> now? Would that be part of CMake or git ?
Maybe this:
http://article.gmane.org/gmane.comp.version-control.git/126286
and this:
http://repo.or.cz/w/msysgit.git?a=blob;f=src/curl/release.sh;h=d7516cbf6e92af4de138ce405d88561fbe1e92a8;hb=968336eddac1874c56cd934d10783566af5a3e26
helps.
To quote myself (as you appear to have missed that):
	Having said that, a CMake-based system _in addition_ to what is 
	tried-and-tested to be able to support all those different kinds of 
	Microsoft Visual Studio (took me 3 attempts to write that without a 
	Freudian) would be welcome, _if_ you succeed in making it compile out
	of the box on msysGit.
	By out-of-the-box I mean: you send a patch that adds 
	/src/cmake/release.sh, I apply the patch (after briefly scanning 
	that it	does not install a backdoor on a machine that is not even
	mine, and therefore will never see even a single of my passwords
	typed in), run it, it compiles installs and commits cmake and cmake
	works.

Short form: if you make it easy for me, I will look at it again, if you make it hard on me, you will just have done to me what you now try to avoid yourself: wasted time.

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 22:19 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

On Tue, Aug 18, 2009 at 12:10 AM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 28 quoted lines
> Hi,
>
> On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
>
>> On Mon, Aug 17, 2009 at 11:05 PM, Johannes
>> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>>
>> > You are putting an undue burden on the already overloaded maintainer.
>>
>> Sorry, but I'm a bit lost now. What maintainer are we talking about now?
>> Junio?
>
> I was talking about me, as maintainer of msysGit.
>
>> As I would be providing a turn-key CMake build system, the only burden I
>> would be putting on the maintainer would be learning CMake.
>>
>> Given that I'm providing a comprehensive (100+ slides) CMake tutorial
>> ( http://www.elpauer.org/stuff/learning_cmake.pdf ) , which I use in
>> my CMake workshops, I think I'm making that burden a bit lighter.
>>
>> If the next git conference is somewhere in Europe, I could also fly
>> there and we'd have a CMake tutorial, if people would feel more
>> comfortable that way.
>
> This is exactly what I mean by burden.  Why do I have to learn a new
> system, and suffer the hassle of integrating it into the current build
> system, which works quite well thankyouverymuch?

Because it works for every platform, including Visual C++, where a Bourne shell is not available and where you currently need to maintain a different built system.

Show 32 quoted lines
> Never run a changing system.
>
>> > Well, let's see if you can provide a /src/cmake/release.sh that
>> > compiles CMake from scratch, and _then_ I'll look into CMake again.
>>
>> Again, I'm a bit lost. What '/src/cmake/release.sh' are we talking about
>> now? Would that be part of CMake or git ?
>
> Maybe this:
>
> http://article.gmane.org/gmane.comp.version-control.git/126286
>
> and this:
>
> http://repo.or.cz/w/msysgit.git?a=blob;f=src/curl/release.sh;h=d7516cbf6e92af4de138ce405d88561fbe1e92a8;hb=968336eddac1874c56cd934d10783566af5a3e26
>
> helps.
>
> To quote myself (as you appear to have missed that):
>
>        Having said that, a CMake-based system _in addition_ to what is
>        tried-and-tested to be able to support all those different kinds of
>        Microsoft Visual Studio (took me 3 attempts to write that without a
>        Freudian) would be welcome, _if_ you succeed in making it compile out
>        of the box on msysGit.
>
>        By out-of-the-box I mean: you send a patch that adds
>        /src/cmake/release.sh, I apply the patch (after briefly scanning
>        that it does not install a backdoor on a machine that is not even
>        mine, and therefore will never see even a single of my passwords
>        typed in), run it, it compiles installs and commits cmake and cmake
>        works.

Hmmm indeed I have missed a lot, thanks. A lot of what you had written in other e-mails was being hidden by GMail as "quoted" text :-/

It seems we are talking about two different things here. I'm talking about getting the CMake-based build system in git.git, you are talking about msysgit. If getting into msysgit is the first step to getting into git.git, I'll start from msysgit. Are the differences between both branches so big they cannot be merged into a single branch yet ?

> Short form: if you make it easy for me, I will look at it again, if you
> make it hard on me, you will just have done to me what you now try
> to avoid yourself: wasted time.
Let's see what I can do.
-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Paolo Bonzini· Aug 17, 2009, 22:21 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

Show 7 quoted lines
>> This is exactly what I mean by burden.  Why do I have to learn a new
>> system, and suffer the hassle of integrating it into the current build
>> system, which works quite well thankyouverymuch?
>
> Because it works for every platform, including Visual C++, where a
> Bourne shell is not available and where you currently need to maintain
> a different built system.

But it comes with its own share of idiosyncracies. There are as many CMake haters as there are autotools haters.

I don't see CMake being used by git.git before hell freezes over. For msysgit, however, it may be an interesting approach.

> Let's see what I can do.
I'm also curious.
Paolo
Thiago Farina· Aug 17, 2009, 22:32 UTC · re: Paolo Bonzini · lore

Re: [PATCH 10/11] Add MSVC Project file

What about the common-cmds.h that is in the builtin-help.c? How it will be generated?I followed the instruction in ReadMe, but I couldn't compile because of this "missing" file.

Thiago Farina· Aug 17, 2009, 22:33 UTC · re: Paolo Bonzini · lore

Re: [PATCH 10/11] Add MSVC Project file

What about the common-cmds.h that is in the builtin-help.c? How it will be generated? I followed the instruction in ReadMe, but I couldn't compile because of this "missing" file.

Johannes Schindelin· Aug 17, 2009, 20:56 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
Show 11 quoted lines
> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
> 
> > Of course, we could have a script that verifies that the .vcproj files 
> > contain reference the appropriate files (which it would know about by 
> > being called from the Makefile and being passed the file names), maybe 
> > even be able to edit the .vcproj file if it is missing some.  Should 
> > not be too hard in Perl.
> 
> You'll need to special-case for Visual C++ 2010, which is different
> and incompatible with previous versions.
Ah, my beloved Microsoft time tax!
> Hence my suggestion for CMake: appropriate project files would be 
> generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, 
> Borland C++ or anything else.

The problem is that this will bitrot even more, as nobody will use it for gcc, Borland C++, XCode, Eclipse or anything else, except for Microsoft Visual C++.

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 20:59 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

On Mon, Aug 17, 2009 at 10:56 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 17 quoted lines
> Hi,
>
> On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
>
>> On Mon, Aug 17, 2009 at 9:53 PM, Johannes
>> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>>
>> > Of course, we could have a script that verifies that the .vcproj files
>> > contain reference the appropriate files (which it would know about by
>> > being called from the Makefile and being passed the file names), maybe
>> > even be able to edit the .vcproj file if it is missing some.  Should
>> > not be too hard in Perl.
>>
>> You'll need to special-case for Visual C++ 2010, which is different
>> and incompatible with previous versions.
>
> Ah, my beloved Microsoft time tax!

Sorry, but I make a living developing cross-platform software and porting stuff among any funny combination of Linux, Windows, gcc, mingw, Intel C++ and Visual C++ you can think of. CMake makes my life easier (possible!). Given that the patches we are talking about happen to add support for Visual C++, I'd say it stepped in at the right moment.

Show 7 quoted lines
>> Hence my suggestion for CMake: appropriate project files would be
>> generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc,
>> Borland C++ or anything else.
>
> The problem is that this will bitrot even more, as nobody will use it for
> gcc, Borland C++, XCode, Eclipse or anything else, except for Microsoft
> Visual C++.

How do you know? Also, please note I'm not talking about *adding* a CMake build system, I'm talking about *replacing* the existing autotools build system with a CMake build system, even if they coexist for some time.

What would be the point of having two build-systems, one (autotools) useless for Visual C++, the other one (CMake) apt for every platform ?

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Schindelin· Aug 17, 2009, 21:11 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
Show 11 quoted lines
> On Mon, Aug 17, 2009 at 10:56 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>
> > The problem is that this will bitrot even more, as nobody will use it 
> > for gcc, Borland C++, XCode, Eclipse or anything else, except for 
> > Microsoft Visual C++.
> 
> How do you know? Also, please note I'm not talking about *adding* a 
> CMake build system, I'm talking about *replacing* the existing autotools 
> build system with a CMake build system, even if they coexist for some 
> time.

You are mistaken. We do not require using the autotools. I _never_ call "./configure" yet the Makefile magically works. Cool, huh?

But here's a clue: you will probably _never_ succeed in getting a replacement of the make-based build in git.git by the maintainer. Make is just too ubiquitous and well-established for that.

Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

By out-of-the-box I mean: you send a patch that adds /src/cmake/release.sh, I apply the patch (after briefly scanning that it does not install a backdoor on a machine that is not even mine, and therefore will never see even a single of my passwords typed in), run it, it compiles installs and commits cmake and cmake works.

If that's not possible, I refuse to add another problem rather than solving one.

If you succeed, I will ask you to do the same for Python, as you clearly proved by that point that you are a magician.

Ciao, Dscho

Johan 't Hart· Aug 17, 2009, 22:26 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

Johannes Schindelin schreef:
Show 5 quoted lines
> Having said that, a CMake-based system _in addition_ to what is 
> tried-and-tested to be able to support all those different kinds of 
> Microsoft Visual Studio (took me 3 attempts to write that without a 
> Freudian) would be welcome, _if_ you succeed in making it compile out of 
> the box on msysGit.

That would require (I think) that CMake is build by the msysgit gcc tools available in msysgit, since CMake can't be build by VS right? Pau do you think that is possible?

It would be fun. Download the msysgit netinstaller, set it up, install it, and after that, CMake is bootstrapped, and the visual studio .vcproj files are generated and everyone (VS developers and msys developers) are ready to go!

Pau Garcia i Quiles· Aug 17, 2009, 23:00 UTC · re: Johan 't Hart · lore

Re: [PATCH 10/11] Add MSVC Project file

On Tue, Aug 18, 2009 at 12:26 AM, Johan 't Hart<johanthart@gmail.com> wrote:
Show 11 quoted lines
> Johannes Schindelin schreef:
>
>> Having said that, a CMake-based system _in addition_ to what is
>> tried-and-tested to be able to support all those different kinds of
>> Microsoft Visual Studio (took me 3 attempts to write that without a
>> Freudian) would be welcome, _if_ you succeed in making it compile out of the
>> box on msysGit.
>
> That would require (I think) that CMake is build by the msysgit gcc tools
> available in msysgit, since CMake can't be build by VS right? Pau do you
> think that is possible?

CMake can certainly be built by VC++ but you need CMake to do that, VC++-CMake cannot be bootstrapped.

Would it be OK to download a binary version of CMake instead of / in addition to the source? (I'm not familiar with the 'release.sh' stuff yet)

> It would be fun. Download the msysgit netinstaller, set it up, install it,
> and after that, CMake is bootstrapped, and the visual studio .vcproj files
> are generated and everyone (VS developers and msys developers) are ready to
> go!

That'd be right, if I have understood what the netinstaller does (I've never used it yet).

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Schindelin· Aug 17, 2009, 23:40 UTC · re: Pau Garcia i Quiles · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Tue, 18 Aug 2009, Pau Garcia i Quiles wrote:
Show 19 quoted lines
> On Tue, Aug 18, 2009 at 12:26 AM, Johan 't Hart<johanthart@gmail.com> wrote:
> > Johannes Schindelin schreef:
> >
> >> Having said that, a CMake-based system _in addition_ to what is 
> >> tried-and-tested to be able to support all those different kinds of 
> >> Microsoft Visual Studio (took me 3 attempts to write that without a 
> >> Freudian) would be welcome, _if_ you succeed in making it compile out 
> >> of the box on msysGit.
> >
> > That would require (I think) that CMake is build by the msysgit gcc 
> > tools available in msysgit, since CMake can't be build by VS right? 
> > Pau do you think that is possible?
> 
> CMake can certainly be built by VC++ but you need CMake to do that, 
> VC++-CMake cannot be bootstrapped.
> 
> Would it be OK to download a binary version of CMake instead of / in
> addition to the source? (I'm not familiar with the 'release.sh' stuff
> yet)

Well, as I tried to establish msysGit as _the_ Git for Windows, I would be willing to created download bundles for Microsoft Visual C++ users, but only if the hassle is not big enough.

Read: if the procedure is a script that does not need to be supervised 
until it created a .zip or .7z file, I'm all for it.
Show 7 quoted lines
> > It would be fun. Download the msysgit netinstaller, set it up, install 
> > it, and after that, CMake is bootstrapped, and the visual studio 
> > .vcproj files are generated and everyone (VS developers and msys 
> > developers) are ready to go!
> 
> That'd be right, if I have understood what the netinstaller does (I've
> never used it yet).
Or that.

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 22:44 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

(Sorry for answering some parts now, I didn't realize this text was there before)

> But here's a clue: you will probably _never_ succeed in getting a
> replacement of the make-based build in git.git by the maintainer.  Make is
> just too ubiquitous and well-established for that.
CMake does not replace Make, it runs a step before CMake
CMakeLists.txt
     |
     |
     |
     v
  Makefile/.vcproj/Eclipse/XCode project/NMakefile
     |
     |
     |
     v
 gcc/VC++/SunCC/whatever
     |
     |
     v
   ld/link.exe/whatever
(see page 10 in my slides for a nicer version :-) )
> If you succeed, I will ask you to do the same for Python, as you clearly
> proved by that point that you are a magician.
I can't do any Python whatsoever, sorry :-)
-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Marius Storm-Olsen· Aug 18, 2009, 12:58 UTC · re: Johannes Schindelin · lore

[RFC] Enable compilation by Makefile for the MSVC toolchain

From: Marius Storm-Olsen <mstormo@gmail.com>

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

!! DO NOT COMMIT THIS UPSTREAM !!
---
 So, instead of rely on these vcproj files which *will* go stale, we can
 simply use the same Makefile system which everyone else is using. :)
 After all, we're just compiling with a different compiler. The end result
 will still rely on the *msysGit environment* to function, so we already
 require it. Thus, GNU Make is present, and we can use it.
 This implementation is a quick hack to make it compile (hence the RFC
 subject), so please don't even consider basing anything ontop of it ;)
 But, do point out all the do's and don'ts, and I'll try to polish it up
 to something which we can add to Frank's series..
 
 Makefile      |   97 +++++++++++++++++++++++++++++++++++++++++++++++---------
 compat/msvc.h |   77 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 158 insertions(+), 16 deletions(-)
Show changes to 2 files +158 −16

Makefile, compat/msvc.h

diff --git a/Makefile b/Makefile
index daf4296..2e14976 100644
--- a/Makefile
+++ b/Makefile
@@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
+ARFLAGS = rcs\ # whitespace intentional
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended
 
 # Among the variables below, these:
 #   gitexecdir
@@ -874,6 +878,58 @@ ifneq (,$(findstring CYGWIN,$(uname_S)))
 	COMPAT_OBJS += compat/cygwin.o
 	UNRELIABLE_FSTAT = UnfortunatelyYes
 endif
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
+	pathsep = ;
+	MOZILLA_SHA1 = 1
+	NO_PREAD = YesPlease
+	NO_OPENSSL = YesPlease
+	NO_LIBGEN_H = YesPlease
+	NO_SYMLINK_HEAD = YesPlease
+	NO_IPV6 = YesPlease
+	NO_SETENV = YesPlease
+	NO_UNSETENV = YesPlease
+	NO_STRCASESTR = YesPlease
+	NO_STRLCPY = YesPlease
+	NO_MEMMEM = YesPlease
+	NEEDS_LIBICONV = YesPlease
+	OLD_ICONV = YesPlease
+	NO_C99_FORMAT = YesPlease
+	NO_STRTOUMAX = YesPlease
+	NO_MKDTEMP = YesPlease
+	NO_MKSTEMPS = YesPlease
+	SNPRINTF_RETURNS_BOGUS = YesPlease
+	NO_SVN_TESTS = YesPlease
+	NO_PERL_MAKEMAKER = YesPlease
+	RUNTIME_PREFIX = YesPlease
+	NO_POSIX_ONLY_PROGRAMS = YesPlease
+	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+	NO_NSEC = YesPlease
+	USE_WIN32_MMAP = YesPlease
+	UNRELIABLE_FSTAT = UnfortunatelyYes
+	OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
+	NO_REGEX = YesPlease
+
+	NO_CURL = YesPlease
+	NO_PTHREADS = YesPlease
+        
+	CC = cl 
+	COBJFLAG = -Fo
+	LOBJFLAG = -OUT:
+	CFLAGS =
+	BASIC_CFLAGS += -nologo -MT -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE
+	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch
+	COMPAT_OBJS += compat/mingw.o compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o
+	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
+
+	LINK = link
+	BASIC_LDFLAGS += -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib ../zlib/projects/vc9/Win32_LIB_Release/zlib.lib
+	NO_CFLAGS_TO_LINKER = YesPlease
+	EXTLIBS = 
+	AR = lib
+	ARFLAGS = -OUT:
+
+	X = .exe
+else
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease
@@ -922,6 +978,7 @@ else
 	NO_PTHREADS = YesPlease
 endif
 endif
+endif
 ifneq (,$(findstring arm,$(uname_M)))
 	ARM_SHA1 = YesPlease
 	NO_MKSTEMPS = YesPlease
@@ -1298,6 +1355,14 @@ LIB_OBJS += $(COMPAT_OBJS)
 ALL_CFLAGS += $(BASIC_CFLAGS)
 ALL_LDFLAGS += $(BASIC_LDFLAGS)
 
+ifndef LINK
+LINK = $(CC)
+endif
+
+ifndef NO_CFLAGS_TO_LINKER
+LINKER_CFLAGS += $(ALL_CFLAGS)
+endif
+
 export TAR INSTALL DESTDIR SHELL_PATH
 
 
@@ -1331,14 +1396,14 @@ strip: $(PROGRAMS) git$X
 git.o: git.c common-cmds.h GIT-CFLAGS
 	$(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
 		'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
-		$(ALL_CFLAGS) -c $(filter %.c,$^)
+		$(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)
 
 git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ git.o \
 		$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
 
 builtin-help.o: builtin-help.c common-cmds.h GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) \
 		'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
 		'-DGIT_MAN_PATH="$(mandir_SQ)"' \
 		'-DGIT_INFO_PATH="$(infodir_SQ)"' $<
@@ -1450,44 +1515,44 @@ git.o git.spec \
 	: GIT-VERSION-FILE
 
 %.o: %.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) $<
 %.s: %.c GIT-CFLAGS
 	$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
 %.o: %.S
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) $<
 
 exec_cmd.o: exec_cmd.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) \
 		'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
 		'-DBINDIR="$(bindir_relative_SQ)"' \
 		'-DPREFIX="$(prefix_SQ)"' \
 		$<
 
 builtin-init-db.o: builtin-init-db.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
 
 config.o: config.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $<
 
 http.o: http.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
 
 ifdef NO_EXPAT
 http-walker.o: http-walker.c http.h GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DNO_EXPAT $<
 endif
 
 git-%$X: %.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
 git-imap-send$X: imap-send.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
 
 http.o http-walker.o http-push.o transport.o: http.h
 
 git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 
 $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
@@ -1495,7 +1560,7 @@ $(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
 builtin-revert.o wt-status.o: wt-status.h
 
 $(LIB_FILE): $(LIB_OBJS)
-	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
+	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS)$@ $(LIB_OBJS)
 
 XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
 	xdiff/xmerge.o xdiff/xpatience.o
@@ -1503,7 +1568,7 @@ $(XDIFF_OBJS): xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
 	xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
 
 $(XDIFF_LIB): $(XDIFF_OBJS)
-	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
+	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS)$@ $(XDIFF_OBJS)
 
 
 doc:
@@ -1605,7 +1670,7 @@ test-parse-options.o: parse-options.h
 .PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
 
 test-%$X: test-%.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
 check-sha1:: test-sha1$X
 	./test-sha1.sh
diff --git a/compat/msvc.h b/compat/msvc.h
index 6071565..a9d5f7f 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -10,50 +10,120 @@
 
 /*Configuration*/
 
+#ifndef NO_PREAD
 #define NO_PREAD
+#endif
+#ifndef NO_OPENSSL
 #define NO_OPENSSL
+#endif
+#ifndef NO_LIBGEN_H
 #define NO_LIBGEN_H
+#endif
+#ifndef NO_SYMLINK_HEAD
 #define NO_SYMLINK_HEAD
+#endif
+#ifndef NO_IPV6
 #define NO_IPV6
+#endif
+#ifndef NO_SETENV
 #define NO_SETENV
+#endif
+#ifndef NO_UNSETENV
 #define NO_UNSETENV
+#endif
+#ifndef NO_STRCASESTR
 #define NO_STRCASESTR
+#endif
+#ifndef NO_STRLCPY
 #define NO_STRLCPY
+#endif
+#ifndef NO_MEMMEM
 #define NO_MEMMEM
+#endif
+#ifndef NO_C99_FORMAT
 #define NO_C99_FORMAT
+#endif
+#ifndef NO_STRTOUMAX
 #define NO_STRTOUMAX
+#endif
+#ifndef NO_MKDTEMP
 #define NO_MKDTEMP
+#endif
+#ifndef NO_MKSTEMPS
 #define NO_MKSTEMPS
+#endif
 
+
+#ifndef RUNTIME_PREFIX
 #define RUNTIME_PREFIX
+#endif
+#ifndef NO_ST_BLOCKS_IN_STRUCT_STAT
 #define NO_ST_BLOCKS_IN_STRUCT_STAT
+#endif
+#ifndef NO_NSEC
 #define NO_NSEC
+#endif
+#ifndef USE_WIN32_MMAP
 #define USE_WIN32_MMAP
+#endif
+#ifndef USE_NED_ALLOCATOR
 #define USE_NED_ALLOCATOR
+#endif
+
 
+#ifndef NO_REGEX
 #define NO_REGEX
+#endif
 
+
+#ifndef NO_SYS_SELECT_H
 #define NO_SYS_SELECT_H
+#endif
+#ifndef NO_PTHEADS
 #define NO_PTHEADS
+#endif
+#ifndef HAVE_STRING_H
 #define HAVE_STRING_H 1
+#endif
+#ifndef STDC_HEADERS
 #define STDC_HEADERS
+#endif
+#ifndef NO_ICONV
 #define NO_ICONV
+#endif
+
 
 #define inline __inline
 #define __inline__ __inline
 
+#ifndef SNPRINTF_RETURNS_BOGUS
 #define SNPRINTF_RETURNS_BOGUS
+#endif
 
+
+#ifndef SHA1_HEADER
 #define SHA1_HEADER "mozilla-sha1\\sha1.h"
+#endif
 
+#ifndef ETC_GITCONFIG
 #define ETC_GITCONFIG "%HOME%"
+#endif
+
 
+#ifndef NO_PTHREADS
 #define NO_PTHREADS
+#endif
+#ifndef NO_CURL
 #define NO_CURL
+#endif
 
 
+#ifndef NO_STRTOUMAX
 #define NO_STRTOUMAX
+#endif
+#ifndef REGEX_MALLOC
 #define REGEX_MALLOC
+#endif
 
 
 #define GIT_EXEC_PATH "bin"
@@ -65,9 +135,16 @@
 #define GIT_HTML_PATH "html"
 #define DEFAULT_GIT_TEMPLATE_DIR "templates"
 
+#ifndef NO_STRLCPY
 #define NO_STRLCPY
+#endif
+#ifndef NO_UNSETENV
 #define NO_UNSETENV
+#endif
+#ifndef NO_SETENV
 #define NO_SETENV
+#endif
+
 
 #define strdup _strdup
 #define read _read
-- 
1.6
Marius Storm-Olsen· Aug 18, 2009, 13:01 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Marius Storm-Olsen said the following on 18.08.2009 14:58:
> This is a rudementary patch, only meant as an RFC for now!!
> 
> !! DO NOT COMMIT THIS UPSTREAM !!
..meaning in this case Frank Li's repo, and obviously not git.git. :p

-- .marius

Erik Faye-Lund· Aug 18, 2009, 13:09 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Tue, Aug 18, 2009 at 2:58 PM, Marius Storm-Olsen<mstormo@gmail.com> wrote:
Show 11 quoted lines
> @@ -1331,14 +1396,14 @@ strip: $(PROGRAMS) git$X
>  git.o: git.c common-cmds.h GIT-CFLAGS
>        $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
>                '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
> -               $(ALL_CFLAGS) -c $(filter %.c,$^)
> +               $(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)
>
>  git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
> -       $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
> +       $(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ git.o \
>                $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
<snip>
Show 5 quoted lines
>  ifdef NO_EXPAT
>  http-walker.o: http-walker.c http.h GIT-CFLAGS
> -       $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
> +       $(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DNO_EXPAT $<
>  endif

Perhaps this is the right time to change the make-system to using the somewhat standard $(COMPLIE.c), $(OUTPUT_OPTION) etc macros?

-- 
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
Johannes Schindelin· Aug 18, 2009, 14:11 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
Show 5 quoted lines
>  So, instead of rely on these vcproj files which *will* go stale, we can 
>  simply use the same Makefile system which everyone else is using. :) 
>  After all, we're just compiling with a different compiler. The end 
>  result will still rely on the *msysGit environment* to function, so we 
>  already require it. Thus, GNU Make is present, and we can use it.

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Show 15 quoted lines
> diff --git a/Makefile b/Makefile
> index daf4296..2e14976 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
>  
>  CFLAGS = -g -O2 -Wall
>  LDFLAGS =
> +ARFLAGS = rcs\ # whitespace intentional
>  ALL_CFLAGS = $(CFLAGS)
>  ALL_LDFLAGS = $(LDFLAGS)
>  STRIP ?= strip
> +COMPFLAG = -c
> +COBJFLAG = -o\ # whitespace intended
> +LOBJFLAG = -o\ # whitespace intended
These probably want to go into the Microsoft Visual C++ specific section.
Show 59 quoted lines
> @@ -874,6 +878,58 @@ ifneq (,$(findstring CYGWIN,$(uname_S)))
>  	COMPAT_OBJS += compat/cygwin.o
>  	UNRELIABLE_FSTAT = UnfortunatelyYes
>  endif
> +ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
> +	pathsep = ;
> +	MOZILLA_SHA1 = 1
> +	NO_PREAD = YesPlease
> +	NO_OPENSSL = YesPlease
> +	NO_LIBGEN_H = YesPlease
> +	NO_SYMLINK_HEAD = YesPlease
> +	NO_IPV6 = YesPlease
> +	NO_SETENV = YesPlease
> +	NO_UNSETENV = YesPlease
> +	NO_STRCASESTR = YesPlease
> +	NO_STRLCPY = YesPlease
> +	NO_MEMMEM = YesPlease
> +	NEEDS_LIBICONV = YesPlease
> +	OLD_ICONV = YesPlease
> +	NO_C99_FORMAT = YesPlease
> +	NO_STRTOUMAX = YesPlease
> +	NO_MKDTEMP = YesPlease
> +	NO_MKSTEMPS = YesPlease
> +	SNPRINTF_RETURNS_BOGUS = YesPlease
> +	NO_SVN_TESTS = YesPlease
> +	NO_PERL_MAKEMAKER = YesPlease
> +	RUNTIME_PREFIX = YesPlease
> +	NO_POSIX_ONLY_PROGRAMS = YesPlease
> +	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
> +	NO_NSEC = YesPlease
> +	USE_WIN32_MMAP = YesPlease
> +	UNRELIABLE_FSTAT = UnfortunatelyYes
> +	OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
> +	NO_REGEX = YesPlease
> +
> +	NO_CURL = YesPlease
> +	NO_PTHREADS = YesPlease
> +        
> +	CC = cl 
> +	COBJFLAG = -Fo
> +	LOBJFLAG = -OUT:
> +	CFLAGS =
> +	BASIC_CFLAGS += -nologo -MT -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE
> +	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch
> +	COMPAT_OBJS += compat/mingw.o compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o
> +	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
> +
> +	LINK = link
> +	BASIC_LDFLAGS += -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib ../zlib/projects/vc9/Win32_LIB_Release/zlib.lib
> +	NO_CFLAGS_TO_LINKER = YesPlease
> +	EXTLIBS = 
> +	AR = lib
> +	ARFLAGS = -OUT:
> +
> +	X = .exe
> +else
>  ifneq (,$(findstring MINGW,$(uname_S)))
>  	pathsep = ;
>  	NO_PREAD = YesPlease
This means that gcc is never used when Visual C++ is available?  Hmm.
Show 11 quoted lines
> diff --git a/compat/msvc.h b/compat/msvc.h
> index 6071565..a9d5f7f 100644
> --- a/compat/msvc.h
> +++ b/compat/msvc.h
> @@ -10,50 +10,120 @@
>  
>  /*Configuration*/
>  
> +#ifndef NO_PREAD
>  #define NO_PREAD
> +#endif

Why? You now have the stuff in two places. If you want to keep them in compat/msvc.h to be able to generate .vcproj files, I'd rather not have them duplicated in the Makefile.

Ciao, Dscho

Pau Garcia i Quiles· Aug 18, 2009, 17:07 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Tue, Aug 18, 2009 at 4:11 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 13 quoted lines
> Hi,
>
> On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
>
>>  So, instead of rely on these vcproj files which *will* go stale, we can
>>  simply use the same Makefile system which everyone else is using. :)
>>  After all, we're just compiling with a different compiler. The end
>>  result will still rely on the *msysGit environment* to function, so we
>>  already require it. Thus, GNU Make is present, and we can use it.
>
> We can also use sed or perl to generate/modify the .vcproj files, or run
> CMake (once Pau got it to build), and package the stuff using zip (once I
> got that to build).
Re: package the stuff using ZIP, it's trivial to do with CPack (part
of the CMake chain). Just tell me what you want to get and I'll
implement it.
-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Schindelin· Aug 18, 2009, 21:35 UTC · re: Pau Garcia i Quiles · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Tue, 18 Aug 2009, Pau Garcia i Quiles wrote:
Show 19 quoted lines
> On Tue, Aug 18, 2009 at 4:11 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>
> > On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> >
> >>  So, instead of rely on these vcproj files which *will* go stale, we 
> >> can  simply use the same Makefile system which everyone else is 
> >> using. :)  After all, we're just compiling with a different compiler. 
> >> The end  result will still rely on the *msysGit environment* to 
> >> function, so we  already require it. Thus, GNU Make is present, and 
> >> we can use it.
> >
> > We can also use sed or perl to generate/modify the .vcproj files, or 
> > run CMake (once Pau got it to build), and package the stuff using zip 
> > (once I got that to build).
> 
> Re: package the stuff using ZIP, it's trivial to do with CPack (part of 
> the CMake chain). Just tell me what you want to get and I'll implement 
> it.

Well, I tried to tell you already what I want. A simple and unsupervised script that downloads, compiles, installs and commits CMake.

Ciao, Dscho

Marius Storm-Olsen· Aug 18, 2009, 17:55 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johannes Schindelin said the following on 18.08.2009 16:11:
Show 11 quoted lines
> On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
>> So, instead of rely on these vcproj files which *will* go stale, we
>> can simply use the same Makefile system which everyone else is
>> using. :) After all, we're just compiling with a different
>> compiler. The end result will still rely on the *msysGit
>> environment* to function, so we already require it. Thus, GNU Make
>> is present, and we can use it.
> 
> We can also use sed or perl to generate/modify the .vcproj files, or
> run CMake (once Pau got it to build), and package the stuff using zip
> (once I got that to build).

Really? That would be some script being able to parse the Makefile, and create something reasonable as a vcproj script :) Keeping all the options in sync, conditional files/libs, all the various end executables (a separate .vcproj for each of them, and a solution file (.sln)to tie them all together into a .. "solution", a complete product blah blah blah) etc.

Just using the (GNU) Makefile as the 'default' way of compiling with MSVC seems to be the most reasonable to me. Then we could just have a contrib/vc/msvc2008.vcproj which someone can update when they feel like it. The default way should be hard to get out-of-sync, IMO.

>> diff --git a/Makefile b/Makefile
>> +ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
...
Show 6 quoted lines
>> +else
>>  ifneq (,$(findstring MINGW,$(uname_S)))
>>  	pathsep = ;
>>  	NO_PREAD = YesPlease
> 
> This means that gcc is never used when Visual C++ is available?  Hmm.

Yes it does :) First, "This implementation is a quick hack to make it compile", so it was all about just making it compile, not being 100% correct. There are still some warnings and options which shouldn't be passed on to cl, so it's by no means complete. Second, having MSVC include paths in INCLUDE when you're compiling with MinGW would be plain wrong. I could use LIB instead, which would be even wronger ;) I was actually going to replace it with a USE_MSVC variable check instead though, so you'd rather do 'make USE_MSVC=1'

Show 15 quoted lines
>> diff --git a/compat/msvc.h b/compat/msvc.h
>> index 6071565..a9d5f7f 100644
>> --- a/compat/msvc.h
>> +++ b/compat/msvc.h
>> @@ -10,50 +10,120 @@
>>  
>>  /*Configuration*/
>>  
>> +#ifndef NO_PREAD
>>  #define NO_PREAD
>> +#endif
> 
> Why?  You now have the stuff in two places.  If you want to keep them in 
> compat/msvc.h to be able to generate .vcproj files, I'd rather not have 
> them duplicated in the Makefile.

The changes to the msvc.h where added just keep Frank's vcproj project working. I would have just nuked all that stuff in the msvc.h since the Makefile would just provide it for me anyways..

-- .marius

Daniel Barkalow· Aug 18, 2009, 18:42 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
Show 18 quoted lines
> Johannes Schindelin said the following on 18.08.2009 16:11:
> > On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> > > So, instead of rely on these vcproj files which *will* go stale, we
> > > can simply use the same Makefile system which everyone else is
> > > using. :) After all, we're just compiling with a different
> > > compiler. The end result will still rely on the *msysGit
> > > environment* to function, so we already require it. Thus, GNU Make
> > > is present, and we can use it.
> > 
> > We can also use sed or perl to generate/modify the .vcproj files, or
> > run CMake (once Pau got it to build), and package the stuff using zip
> > (once I got that to build).
> 
> Really? That would be some script being able to parse the Makefile, and create
> something reasonable as a vcproj script :) Keeping all the options in sync,
> conditional files/libs, all the various end executables (a separate .vcproj
> for each of them, and a solution file (.sln)to tie them all together into a ..
> "solution", a complete product blah blah blah) etc.

I think it wouldn't be impossible to split the Makefile into an easy-to-parse part and an irrelevant-to-vcproj part. Certainly you don't need GNU Make to read a file:

SCRIPT_SH += git-am.sh SCRIPT_SH += git-bisect.sh

SCRIPT_PERL += git-add--interactive.perl
PROGRAM_NAMES += git-fast-import
BUILTINS_IN_OBJS += add
(etc)
That is, we can probably describe the project sufficiently with a lot of
VAR += value

lines, using only constant values and variables we specify, and then the Makefile declares them empty and does an

include UserServicableParts

and puts together the variables it needs. And things that aren't GNU Make could also process this file without enormous difficulty, since it's essentially a .ini file or java resource file with a stray + on each line. Of course, people interested in the vcproj thing would have to update whatever makes VC do the right thing when new *rules* are introduced, but that's a lot less common than new *files* being introduced, and also more obvious (in the sense that the included file is setting variables that the builder doesn't know what to do with).

	-Daniel
*This .sig left intentionally blank*
Johannes Schindelin· Aug 18, 2009, 21:57 UTC · re: Daniel Barkalow · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Tue, 18 Aug 2009, Daniel Barkalow wrote:
Show 24 quoted lines
> On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> 
> > Johannes Schindelin said the following on 18.08.2009 16:11:
> > > On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> > > > So, instead of rely on these vcproj files which *will* go stale, 
> > > > we can simply use the same Makefile system which everyone else is 
> > > > using. :) After all, we're just compiling with a different 
> > > > compiler. The end result will still rely on the *msysGit 
> > > > environment* to function, so we already require it. Thus, GNU Make 
> > > > is present, and we can use it.
> > > 
> > > We can also use sed or perl to generate/modify the .vcproj files, or 
> > > run CMake (once Pau got it to build), and package the stuff using 
> > > zip (once I got that to build).
> > 
> > Really? That would be some script being able to parse the Makefile, 
> > and create something reasonable as a vcproj script :) Keeping all the 
> > options in sync, conditional files/libs, all the various end 
> > executables (a separate .vcproj for each of them, and a solution file 
> > (.sln)to tie them all together into a .. "solution", a complete 
> > product blah blah blah) etc.
> 
> I think it wouldn't be impossible to split the Makefile into an 
> easy-to-parse part and an irrelevant-to-vcproj part.
What?  That is pretty fragile.

It would be _much_ better to just add another Makefile target that outputs the files needed for the targets.

We do not need to keep the Makefile as-is! If the change is not intrusive, I am sure our friendly maintainer will not see a problem either.

No need for fragile parsing at all.

Ciao, Dscho

Johannes Schindelin· Aug 19, 2009, 09:58 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
Show 15 quoted lines
> Johannes Schindelin said the following on 18.08.2009 16:11:
>
> > On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> > 
> > > diff --git a/Makefile b/Makefile
> > > +ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
> ...
> > > +else
> > >  ifneq (,$(findstring MINGW,$(uname_S)))
> > >   pathsep = ;
> > >   NO_PREAD = YesPlease
> > 
> > This means that gcc is never used when Visual C++ is available?  Hmm.
> 
> Yes it does :)

As you know, I do not own a Windows computer. On the Windows computer I am allowed to use sometimes to test Git and my day-time project, the Express edition was installed, but it was never registered, so it is not usable, and I would not want to use it anyway.

So this change would break my setup.
> I was actually going to replace it with a USE_MSVC variable check 
> instead though, so you'd rather do 'make USE_MSVC=1'
That's much nicer, especially since you can put that into config.mak.
Show 19 quoted lines
> > > diff --git a/compat/msvc.h b/compat/msvc.h
> > > index 6071565..a9d5f7f 100644
> > > --- a/compat/msvc.h
> > > +++ b/compat/msvc.h
> > > @@ -10,50 +10,120 @@
> > >  
> > >  /*Configuration*/
> > >  
> > > +#ifndef NO_PREAD
> > > #define NO_PREAD
> > > +#endif
> > 
> > Why?  You now have the stuff in two places.  If you want to keep them 
> > in compat/msvc.h to be able to generate .vcproj files, I'd rather not 
> > have them duplicated in the Makefile.
>
> The changes to the msvc.h where added just keep Frank's vcproj project 
> working. I would have just nuked all that stuff in the msvc.h since the 
> Makefile would just provide it for me anyways..
So maybe you and Frank (and Pau) hash out what you want?

Ciao, Dscho

Johan 't Hart· Aug 18, 2009, 16:22 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Marius Storm-Olsen schreef:
Show 5 quoted lines
> From: Marius Storm-Olsen <mstormo@gmail.com>
> 
> By using GNU Make we can also compile with the MSVC toolchain.
> This is a rudementary patch, only meant as an RFC for now!!
> 

Would this mean that only the MSVC toolchain is used to build git in batch? Or does GNU Make create a .vcproj file like CMake? Because that ofcource is the whole purpose of using CMake. One can use the Visual Studio IDE to hack on git.

Reece Dunn· Aug 18, 2009, 16:28 UTC · re: Johan 't Hart · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

2009/8/18 Johan 't Hart <johanthart@gmail.com>:
Show 12 quoted lines
> Marius Storm-Olsen schreef:
>>
>> From: Marius Storm-Olsen <mstormo@gmail.com>
>>
>> By using GNU Make we can also compile with the MSVC toolchain.
>> This is a rudementary patch, only meant as an RFC for now!!
>>
>
> Would this mean that only the MSVC toolchain is used to build git in batch?
> Or does GNU Make create a .vcproj file like CMake? Because that ofcource is
> the whole purpose of using CMake. One can use the Visual Studio IDE to hack
> on git.

... unless you add a file to the vcproj, or change the project settings: you'll need to update the CMake file and the Make file (for the POSIX builds), otherwise you're going to break things.

- Reece
Pau Garcia i Quiles· Aug 18, 2009, 17:06 UTC · re: Johan 't Hart · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Tue, Aug 18, 2009 at 6:22 PM, Johan 't Hart<johanthart@gmail.com> wrote:
Show 10 quoted lines
> Marius Storm-Olsen schreef:
>>
>> From: Marius Storm-Olsen <mstormo@gmail.com>
>>
>> By using GNU Make we can also compile with the MSVC toolchain.
>> This is a rudementary patch, only meant as an RFC for now!!
>>
>
> Would this mean that only the MSVC toolchain is used to build git in batch?
> Or does GNU Make create a .vcproj file like CMake?

That patch uses GNU Make but invoking the MSVC compiler, linker, etc instead of the GNU compiler, linker, etc. It'd be the same if you wanted to use the Intel compiler, the Sun compiler, etc.

> Because that ofcource is
> the whole purpose of using CMake. One can use the Visual Studio IDE to hack
> on git.

CMake is also useful to create installers/tarballs (see CPack), run tests (see CTest; it's NOT a unit test library but a tests launcher on steroids) and submit the results of compilation, tests and installation to a dashboard where you can easily see what (if anything) went wrong (see CDash, formerly Dart).

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Paolo Bonzini· Aug 18, 2009, 17:44 UTC · re: Pau Garcia i Quiles · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Show 5 quoted lines
> CMake is also useful to create installers/tarballs (see CPack), run
> tests (see CTest; it's NOT a unit test library but a tests launcher on
> steroids) and submit the results of compilation, tests and
> installation to a dashboard where you can easily see what (if
> anything) went wrong (see CDash, formerly Dart).

If I know the git hackers, CMake will _never_ be used except _possibly_ for generating a .vcproj file.

Paolo
Junio C Hamano· Aug 18, 2009, 16:51 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Marius Storm-Olsen <mstormo@gmail.com> writes:
Marius Storm-Olsen <mstormo@gmail.com> writes:
Show 14 quoted lines
> +ARFLAGS = rcs\ # whitespace intentional
> +COMPFLAG = -c
> +COBJFLAG = -o\ # whitespace intended
> +LOBJFLAG = -o\ # whitespace intended
> ...
> +ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
> +	CC = cl 
> +	COBJFLAG = -Fo
> +	LOBJFLAG = -OUT:
> +	CFLAGS =
>  git.o: git.c common-cmds.h GIT-CFLAGS
> ...
> -		$(ALL_CFLAGS) -c $(filter %.c,$^)
> +		$(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)

Since use of make implies use of shell, this makes me wonder if it would make sense to go one step further by giving msvc users a thin shell wrapper mcvc-cc that turns bog-standard cc command line into whatever cl uses.

Marius Storm-Olsen· Aug 18, 2009, 17:36 UTC · re: Junio C Hamano · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Junio C Hamano said the following on 18.08.2009 18:51:
Show 23 quoted lines
> Marius Storm-Olsen <mstormo@gmail.com> writes:
> 
> Marius Storm-Olsen <mstormo@gmail.com> writes:
> 
>> +ARFLAGS = rcs\ # whitespace intentional
>> +COMPFLAG = -c
>> +COBJFLAG = -o\ # whitespace intended
>> +LOBJFLAG = -o\ # whitespace intended
>> ...
>> +ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
>> +	CC = cl 
>> +	COBJFLAG = -Fo
>> +	LOBJFLAG = -OUT:
>> +	CFLAGS =
>>  git.o: git.c common-cmds.h GIT-CFLAGS
>> ...
>> -		$(ALL_CFLAGS) -c $(filter %.c,$^)
>> +		$(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)
> 
> Since use of make implies use of shell, this makes me wonder if it would
> make sense to go one step further by giving msvc users a thin shell
> wrapper mcvc-cc that turns bog-standard cc command line into whatever cl
> uses.

That, of course, is also a feasible option :) However, there are still things you wouldn't want to pass on to this script, for example, we don't pass on all the CFLAGS to the linker on Windows.

The "whitespace intended" in the patch are quite nasty though..

-- .marius

Johan 't Hart· Aug 18, 2009, 17:41 UTC · re: Junio C Hamano · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Junio C Hamano schreef:
> Since use of make implies use of shell, this makes me wonder if it would
> make sense to go one step further by giving msvc users a thin shell
> wrapper mcvc-cc that turns bog-standard cc command line into whatever cl
> uses.

Just using the msvc toolchain for building git misses the whole purpose of what VC is used for. MSVC would be used because of the IDE, not for the compiler IMO. msysgit already has a nice toolchain, using gcc, to build git. I think there is no reason to use MSVC for that purpose.

The purpose of CMake was to build an .vcproj file to be used by the IDE, not for a batch process that builds git with the VC toolchain. Users could than hack git with the IDE from MSVC. And ofcource git should then also be compilable by MSVC's cl.exe, because the IDE is not capable of using another toolchain then its own...

Marius Storm-Olsen· Aug 18, 2009, 18:06 UTC · re: Johan 't Hart · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johan 't Hart said the following on 18.08.2009 19:41:
Show 9 quoted lines
> Junio C Hamano schreef:
>> Since use of make implies use of shell, this makes me wonder if it
>> would make sense to go one step further by giving msvc users a thin
>> shell wrapper mcvc-cc that turns bog-standard cc command line into
>> whatever cl uses.
> 
> Just using the msvc toolchain for building git misses the whole
> purpose of what VC is used for. MSVC would be used because of the
> IDE, not for the compiler IMO.

Bull. MSVC produces superior code on Windows compared to MinGW, I'm afraid. Add the /LTGC (Link Time Code Generation), and MSVC generates very good cross compile-unit optimized code. (I know gcc has the option, but it's not as good, by far) Coupled now with built-in static code analysis, these are only two reasons why *I* would want to build it directly from the command line without worrying that my .vcproj is out-of-sync with the main development. You can still debug with the MSVC debugger if you'd like, and the MSVC IDE allows you to wrap Makefile project too, so you can *still* use the IDE..

-- .marius

Johannes Schindelin· Aug 18, 2009, 21:53 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
Show 20 quoted lines
> Johan 't Hart said the following on 18.08.2009 19:41:
> > Junio C Hamano schreef:
> > > Since use of make implies use of shell, this makes me wonder if it
> > > would make sense to go one step further by giving msvc users a thin
> > > shell wrapper mcvc-cc that turns bog-standard cc command line into
> > > whatever cl uses.
> > 
> > Just using the msvc toolchain for building git misses the whole
> > purpose of what VC is used for. MSVC would be used because of the
> > IDE, not for the compiler IMO.
> 
> Bull. MSVC produces superior code on Windows compared to MinGW, I'm afraid.
> Add the /LTGC (Link Time Code Generation), and MSVC generates very good cross
> compile-unit optimized code. (I know gcc has the option, but it's not as good,
> by far)
> Coupled now with built-in static code analysis, these are only two reasons why
> *I* would want to build it directly from the command line without worrying
> that my .vcproj is out-of-sync with the main development.
> You can still debug with the MSVC debugger if you'd like, and the MSVC IDE
> allows you to wrap Makefile project too, so you can *still* use the IDE..

Well, "you can *still* use the IDE" is a bit exaggerated, no? At least unless you misunderstand "IDE" to mean "Integrated Debugging environment".

You'll lose not only the ability to follow definitions/declarations in the code, you'll also lose the ability to compile incrementally _while_ debuggin, and Visual Studio's feature to move to the next/previous compile error.

Ciao, Dscho

Erik Faye-Lund· Aug 18, 2009, 22:02 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Tue, Aug 18, 2009 at 11:53 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

> debuggin, and Visual Studio's feature to move to the next/previous compile
> error.

Nope, you're still able to skip through the erros (with F4) as ususal. I've been using a sed-script to translate gcc-style errors to msvc-style errors for makefile projects before with great success. In this case, the errors are already in msvc-style, so that part should really not be any issue.

-- 
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
Johannes Schindelin· Aug 18, 2009, 22:38 UTC · re: Erik Faye-Lund · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Wed, 19 Aug 2009, Erik Faye-Lund wrote:
Show 10 quoted lines
> On Tue, Aug 18, 2009 at 11:53 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
> > debuggin, and Visual Studio's feature to move to the next/previous 
> > compile error.
> 
> Nope, you're still able to skip through the erros (with F4) as ususal. 
> I've been using a sed-script to translate gcc-style errors to msvc-style 
> errors for makefile projects before with great success. In this case, 
> the errors are already in msvc-style, so that part should really not be 
> any issue.
At this point you are just piling work-around on work-around.

Ciao, Dscho

Erik Faye-Lund· Aug 18, 2009, 22:48 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Wed, Aug 19, 2009 at 12:38 AM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 7 quoted lines
>> Nope, you're still able to skip through the erros (with F4) as ususal.
>> I've been using a sed-script to translate gcc-style errors to msvc-style
>> errors for makefile projects before with great success. In this case,
>> the errors are already in msvc-style, so that part should really not be
>> any issue.
>
> At this point you are just piling work-around on work-around.

At what point? This works out of the box for makefile projects that use msvc for compilation. Sure, for my gcc-setup, yeah. But how is that being a stack of work-arounds relevant in this context?

I'm not arguing either way here - I'm perfectly happy to stick with MinGW.

I'm just saying that one of the problems you pointed out is not really a problem. The rest of them sounds like very much like real problems to me - not particularly big issues, you're the one who just said that perfect is the enemy of the good, no? ;)

-- 
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
Johannes Schindelin· Aug 19, 2009, 07:16 UTC · re: Erik Faye-Lund · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Wed, 19 Aug 2009, Erik Faye-Lund wrote:
Show 11 quoted lines
> On Wed, Aug 19, 2009 at 12:38 AM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
> >> Nope, you're still able to skip through the erros (with F4) as ususal.
> >> I've been using a sed-script to translate gcc-style errors to msvc-style
> >> errors for makefile projects before with great success. In this case,
> >> the errors are already in msvc-style, so that part should really not be
> >> any issue.
> >
> > At this point you are just piling work-around on work-around.
> 
> At what point?

At the point where you bolt on a sed script on top of a bolted-on build procedure.

Using a Makefile from within Visual Studio is just not the intended way to do things, so you will hit the limitations sooner or later.

For example when the sed script encounters a situation which was not anticipated by the script author.

So I think if we support Microsoft Visual C++, it should be either through .vcproj files, or through a procedure that creates them.

Ciao, Dscho

Marius Storm-Olsen· Aug 19, 2009, 07:29 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johannes Schindelin said the following on 19.08.2009 09:16:
Show 23 quoted lines
> On Wed, 19 Aug 2009, Erik Faye-Lund wrote:
>> On Wed, Aug 19, 2009 at 12:38 AM, Johannes 
>> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>>>> Nope, you're still able to skip through the erros (with F4)
>>>> as ususal. I've been using a sed-script to translate
>>>> gcc-style errors to msvc-style errors for makefile projects
>>>> before with great success. In this case, the errors are
>>>> already in msvc-style, so that part should really not be any
>>>> issue.
>>> At this point you are just piling work-around on work-around.
>> At what point?
> 
> At the point where you bolt on a sed script on top of a bolted-on
> build procedure.
> 
> Using a Makefile from within Visual Studio is just not the intended
> way to do things, so you will hit the limitations sooner or later.
> 
> For example when the sed script encounters a situation which was
> not anticipated by the script author.
> 
> So I think if we support Microsoft Visual C++, it should be either
> through .vcproj files, or through a procedure that creates them.

IMO, and I'm primarily a Windows developer mind you and spend a lot of time in Visual Studio, the primary is to support *compiling* git with VC, which is easily done with a few changes to the current Makefile.

The full IDE support is secondary, first because you *can* use the IDE already, and second because it'll be harder to whip something up which guarantees that the vcproj support stays in-sync at all times and won't lag behind.

If you want, you can even use Qt Creator's Makefile support on any platform to build and debug git, and get tab completion, code refactoring support, 'quick open' navigation etc. So, I still think the primary focus should be to simply add the VC support in the current setup, and ensure that the patch series is up to scratch; and when that's all done, *then* add the effort of properly supporting the various IDEs.

Of course, if someone has a huge itch to restructure the current Makefile; factoring out the files into a file which can simply be included in the current Makefile, and easily parsed by a script, or included by CMake, then that can be done in parallel and possible added to git mainline before the MSVC support patches from Frank.

-- .marius

Johannes Schindelin· Aug 19, 2009, 08:29 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:
> The full IDE support is secondary, first because you *can* use the IDE 
> already, and second because it'll be harder to whip something up which 
> guarantees that the vcproj support stays in-sync at all times and won't 
> lag behind.

I think the point of Frank's patches is to make Visual Studio users comfortable with Git. You cannot ask those to use a build process or an IDE they are not used to.

Show 5 quoted lines
> Of course, if someone has a huge itch to restructure the current 
> Makefile; factoring out the files into a file which can simply be 
> included in the current Makefile, and easily parsed by a script, or 
> included by CMake, then that can be done in parallel and possible added 
> to git mainline before the MSVC support patches from Frank.

I still think it would be possible to use a combination of a Makefile rule and GNU make features to spit out a list of targets and their dependet .h and .c files.

Ciao, Dscho

Thomas Berg· Aug 19, 2009, 08:56 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

On Wed, Aug 19, 2009 at 10:29 AM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 13 quoted lines
> Hi,
>
> On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:
>
>> The full IDE support is secondary, first because you *can* use the IDE
>> already, and second because it'll be harder to whip something up which
>> guarantees that the vcproj support stays in-sync at all times and won't
>> lag behind.
>
> I think the point of Frank's patches is to make Visual Studio users
> comfortable with Git.  You cannot ask those to use a build process or an
> IDE they are not used to.
>

I don't know Frank's intentions behind adding the .vcproj files. Maybe it was just easier for him to create them, rather than hacking the Makefile?

As a Windows / Visual Studio user, I have to agree with Marius' points here. Most importantly, get the git code itself to compile with Visual Studio. Did anyone do any benchmarking yet? I wouldn't be surprised if we got some speed improvements from this. Also, it will no longer impossible to use the Visual Studio debugger.

Supporting the Visual Studio compiler in the Makefile seems like an excellent and maintainable way of getting the build up and running.

I can't speek for all Visual Studio users, of course, but personally I couldn't care less about the .vcproj files. I use other IDE's for developing on Windows (qt-creator, eclipse-cdt), so for me .vcproj files would be useless. The Makefile should work from any IDE. In my experience, all of qt-creator, eclipse _and_ Visual Studio support running any make-like program, and parse the compiler errors correctly without using sed or other kinds of magic.

>
> I still think it would be possible to use a combination of a
> Makefile rule and GNU make features to spit out a list of targets and
> their dependet .h and .c files.

I wouldn't mind if someone was willing to add and maintain this, of course, but at least for me it wouldn't be particularely useful.

Cheers, Thomas Berg

Marius Storm-Olsen· Aug 19, 2009, 10:59 UTC · re: Johannes Schindelin · lore

Re: [msysGit] Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johannes Schindelin said the following on 19.08.2009 10:29:
Show 22 quoted lines
> Hi,
> 
> On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:
> 
>> The full IDE support is secondary, first because you *can* use the IDE 
>> already, and second because it'll be harder to whip something up which 
>> guarantees that the vcproj support stays in-sync at all times and won't 
>> lag behind.
> 
> I think the point of Frank's patches is to make Visual Studio users 
> comfortable with Git.  You cannot ask those to use a build process or an 
> IDE they are not used to.
> 
>> Of course, if someone has a huge itch to restructure the current 
>> Makefile; factoring out the files into a file which can simply be 
>> included in the current Makefile, and easily parsed by a script, or 
>> included by CMake, then that can be done in parallel and possible added 
>> to git mainline before the MSVC support patches from Frank.
> 
> I still think it would be possible to use a combination of a 
> Makefile rule and GNU make features to spit out a list of targets and 
> their dependet .h and .c files.

Ok, but you would still have to rely on GNU Make in this setup, and it would have to generate the common_cmds.h before you can even compile with the MSVC IDE.

-- .marius

Johannes Schindelin· Aug 19, 2009, 12:56 UTC · re: Marius Storm-Olsen · lore

Re: [msysGit] Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,
On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:
Show 27 quoted lines
> Johannes Schindelin said the following on 19.08.2009 10:29:
> > Hi,
> > 
> > On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:
> > 
> > > The full IDE support is secondary, first because you *can* use the 
> > > IDE already, and second because it'll be harder to whip something up 
> > > which guarantees that the vcproj support stays in-sync at all times 
> > > and won't lag behind.
> > 
> > I think the point of Frank's patches is to make Visual Studio users 
> > comfortable with Git.  You cannot ask those to use a build process or 
> > an IDE they are not used to.
> > 
> > > Of course, if someone has a huge itch to restructure the current 
> > > Makefile; factoring out the files into a file which can simply be 
> > > included in the current Makefile, and easily parsed by a script, or 
> > > included by CMake, then that can be done in parallel and possible 
> > > added to git mainline before the MSVC support patches from Frank.
> > 
> > I still think it would be possible to use a combination of a Makefile 
> > rule and GNU make features to spit out a list of targets and their 
> > dependet .h and .c files.
> 
> Ok, but you would still have to rely on GNU Make in this setup, and it 
> would have to generate the common_cmds.h before you can even compile 
> with the MSVC IDE.

But then I could bundle it up and give it to a Visual Studio user and they do not need msysGit.

But maybe we should require them to have msysGit? After all, if the package is too small, no Windows developer will take it seriously, right? ;-)

Ciao, Dscho

Marius Storm-Olsen· Aug 19, 2009, 13:26 UTC · re: Johannes Schindelin · lore

Re: [msysGit] Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johannes Schindelin said the following on 19.08.2009 14:56:
Show 11 quoted lines
> On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:
>> Ok, but you would still have to rely on GNU Make in this setup,
>> and it would have to generate the common_cmds.h before you can
>> even compile with the MSVC IDE.
> 
> But then I could bundle it up and give it to a Visual Studio user
> and they do not need msysGit.
> 
> But maybe we should require them to have msysGit?  After all, if
> the package is too small, no Windows developer will take it
> seriously, right? ;-)

They would still require the rest of the msysgit environment to be able to use the result. Not until we have zero scripts left as git commands can we ditch the msysgit environment. So yes, even for msvc-built git is msysgit required. Its just not build with MinGW.

-- .marius

Erik Faye-Lund· Aug 19, 2009, 14:51 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Wed, Aug 19, 2009 at 3:26 PM, Marius Storm-Olsen<marius@storm-olsen.com> wrote:

> They would still require the rest of the msysgit environment to be able to
> use the result. Not until we have zero scripts left as git commands can we
> ditch the msysgit environment. So yes, even for msvc-built git is msysgit
> required. Its just not build with MinGW.

...perhaps support for msvc for a subset of git-core (without all shell scripts, that is) is just the incentive some windows-developers need to start developing c-versions of the lacking functionality? A pure C git-core would IMO be the ideal case. Utilities could still be scripted on top of this through bindings given that the developer have perl installed, no?

-- 
Erik "kusma" Faye-Lund
kusmabite@gmail.com
(+47) 986 59 656
Joshua Jensen· Aug 19, 2009, 13:04 UTC · re: Johannes Schindelin · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

----- Original Message -----
From: Johannes Schindelin
Date: 8/19/2009 1:16 AM
> Using a Makefile from within Visual Studio is just not the intended way to 
> do things, so you will hit the limitations sooner or later.
>   

I use Visual Studio makefile projects daily and have for years. In my case, an additional script takes the Jam build scripts and creates the .vcproj files with the proper file lists and project source folders. These Makefile .vcproj files have full support for Intellisense, debugging, and nearly everything else. The only thing a Makefile project doesn't seem to expose is single file compilation.

Josh
Daniel Barkalow· Aug 18, 2009, 16:51 UTC · re: Marius Storm-Olsen · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
Show 39 quoted lines
> From: Marius Storm-Olsen <mstormo@gmail.com>
> 
> By using GNU Make we can also compile with the MSVC toolchain.
> This is a rudementary patch, only meant as an RFC for now!!
> 
> !! DO NOT COMMIT THIS UPSTREAM !!
> ---
>  So, instead of rely on these vcproj files which *will* go stale, we can
>  simply use the same Makefile system which everyone else is using. :)
>  After all, we're just compiling with a different compiler. The end result
>  will still rely on the *msysGit environment* to function, so we already
>  require it. Thus, GNU Make is present, and we can use it.
> 
>  This implementation is a quick hack to make it compile (hence the RFC
>  subject), so please don't even consider basing anything ontop of it ;)
> 
>  But, do point out all the do's and don'ts, and I'll try to polish it up
>  to something which we can add to Frank's series..
>  
> 
>  Makefile      |   97 +++++++++++++++++++++++++++++++++++++++++++++++---------
>  compat/msvc.h |   77 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 158 insertions(+), 16 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index daf4296..2e14976 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
>  
>  CFLAGS = -g -O2 -Wall
>  LDFLAGS =
> +ARFLAGS = rcs\ # whitespace intentional
>  ALL_CFLAGS = $(CFLAGS)
>  ALL_LDFLAGS = $(LDFLAGS)
>  STRIP ?= strip
> +COMPFLAG = -c
> +COBJFLAG = -o\ # whitespace intended
> +LOBJFLAG = -o\ # whitespace intended

I think it's nicer to write the significant whitespace with non-whitespace text using something like:

empty= space=$(empty) $(empty)

(...)
ARFLAGS = rcs$(space)
COBJFLAG = -o$(space)

On the other hand, I think it would be clearer to put the "rcs" in the default version of $(AR), and have a $(AROBJFLAG) set to nothing there, since the "rcs" isn't actually at all like the "-OUT:" with respect to what it's doing there.

Possibly also to have two variables for the output of the toolchain wrapper, one that is before the name of the file and one that's attached to the name of the file.

	-Daniel
*This .sig left intentionally blank*
Marius Storm-Olsen· Aug 18, 2009, 17:38 UTC · re: Daniel Barkalow · lore

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Daniel Barkalow said the following on 18.08.2009 18:51:
Show 62 quoted lines
> On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> 
>> From: Marius Storm-Olsen <mstormo@gmail.com>
>>
>> By using GNU Make we can also compile with the MSVC toolchain.
>> This is a rudementary patch, only meant as an RFC for now!!
>>
>> !! DO NOT COMMIT THIS UPSTREAM !!
>> ---
>>  So, instead of rely on these vcproj files which *will* go stale, we can
>>  simply use the same Makefile system which everyone else is using. :)
>>  After all, we're just compiling with a different compiler. The end result
>>  will still rely on the *msysGit environment* to function, so we already
>>  require it. Thus, GNU Make is present, and we can use it.
>>
>>  This implementation is a quick hack to make it compile (hence the RFC
>>  subject), so please don't even consider basing anything ontop of it ;)
>>
>>  But, do point out all the do's and don'ts, and I'll try to polish it up
>>  to something which we can add to Frank's series..
>>  
>>
>>  Makefile      |   97 +++++++++++++++++++++++++++++++++++++++++++++++---------
>>  compat/msvc.h |   77 +++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 158 insertions(+), 16 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index daf4296..2e14976 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
>>  
>>  CFLAGS = -g -O2 -Wall
>>  LDFLAGS =
>> +ARFLAGS = rcs\ # whitespace intentional
>>  ALL_CFLAGS = $(CFLAGS)
>>  ALL_LDFLAGS = $(LDFLAGS)
>>  STRIP ?= strip
>> +COMPFLAG = -c
>> +COBJFLAG = -o\ # whitespace intended
>> +LOBJFLAG = -o\ # whitespace intended
> 
> I think it's nicer to write the significant whitespace with non-whitespace 
> text using something like:
> 
> empty=
> space=$(empty) $(empty)
> 
> (...)
> 
> ARFLAGS = rcs$(space)
> 
> COBJFLAG = -o$(space)
> 
> On the other hand, I think it would be clearer to put the "rcs" in the 
> default version of $(AR), and have a $(AROBJFLAG) set to nothing there, 
> since the "rcs" isn't actually at all like the "-OUT:" with respect to 
> what it's doing there.
> 
> Possibly also to have two variables for the output of the toolchain 
> wrapper, one that is before the name of the file and one that's attached 
> to the name of the file.

I agree on all accounts. If we don't go for a wrapper script, as Junio suggested, then I'll definitely do it like you suggested.

-- .marius

Thiago Farina· Aug 17, 2009, 22:27 UTC · re: Frank Li · lore

Re: [PATCH 10/11] Add MSVC Project file

What about the common-cmds.h that is included in builtin-help.c? How it will be generated? I followed the instructions in ReadMe, then I can't compile because of this "missing" file. On Mon, Aug 17, 2009 at 1:05 PM, Frank Li <lznuaa@gmail.com> wrote:

Show 1631 quoted lines
> Add libgit.vcproj to build common library.
> Add git.vcproj to build git program.
>
> Signed-off-by: Frank Li <lznuaa@gmail.com>
> ---
>  compat/vcbuild/git/git.vcproj       |  197 +++++
>  compat/vcbuild/libgit/libgit.vcproj | 1347
> +++++++++++++++++++++++++++++++++++
>  2 files changed, 1544 insertions(+), 0 deletions(-)
>  create mode 100644 compat/vcbuild/git/git.vcproj
>  create mode 100644 compat/vcbuild/libgit/libgit.vcproj
>
> diff --git a/compat/vcbuild/git/git.vcproj b/compat/vcbuild/git/git.vcproj
> new file mode 100644
> index 0000000..6f85de3
> --- /dev/null
> +++ b/compat/vcbuild/git/git.vcproj
> @@ -0,0 +1,197 @@
> +<?xml version="1.0" encoding="gb2312"?>
> +<VisualStudioProject
> +       ProjectType="Visual C++"
> +       Version="9.00"
> +       Name="git"
> +       ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
> +       RootNamespace="git"
> +       Keyword="Win32Proj"
> +       TargetFrameworkVersion="196613"
> +       >
> +       <Platforms>
> +               <Platform
> +                       Name="Win32"
> +               />
> +       </Platforms>
> +       <ToolFiles>
> +       </ToolFiles>
> +       <Configurations>
> +               <Configuration
> +                       Name="Debug|Win32"
> +
> OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
> +                       IntermediateDirectory="$(ConfigurationName)"
> +                       ConfigurationType="1"
> +                       CharacterSet="0"
> +                       >
> +                       <Tool
> +                               Name="VCPreBuildEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCCustomBuildTool"
> +                       />
> +                       <Tool
> +                               Name="VCXMLDataGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCWebServiceProxyGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCMIDLTool"
> +                       />
> +                       <Tool
> +                               Name="VCCLCompilerTool"
> +                               Optimization="0"
> +
> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
> +
> PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
> +                               MinimalRebuild="true"
> +                               BasicRuntimeChecks="3"
> +                               RuntimeLibrary="3"
> +                               UsePrecompiledHeader="0"
> +                               WarningLevel="3"
> +                               DebugInformationFormat="4"
> +                       />
> +                       <Tool
> +                               Name="VCManagedResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCPreLinkEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCLinkerTool"
> +                               AdditionalDependencies="wininet.lib
> ws2_32.lib "
> +                               LinkIncremental="2"
> +                               GenerateDebugInformation="true"
> +                               SubSystem="1"
> +                               TargetMachine="1"
> +                       />
> +                       <Tool
> +                               Name="VCALinkTool"
> +                       />
> +                       <Tool
> +                               Name="VCManifestTool"
> +                       />
> +                       <Tool
> +                               Name="VCXDCMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCBscMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCFxCopTool"
> +                       />
> +                       <Tool
> +                               Name="VCAppVerifierTool"
> +                       />
> +                       <Tool
> +                               Name="VCPostBuildEventTool"
> +                       />
> +               </Configuration>
> +               <Configuration
> +                       Name="Release|Win32"
> +
> OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
> +                       IntermediateDirectory="$(ConfigurationName)"
> +                       ConfigurationType="1"
> +                       CharacterSet="0"
> +                       WholeProgramOptimization="1"
> +                       >
> +                       <Tool
> +                               Name="VCPreBuildEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCCustomBuildTool"
> +                       />
> +                       <Tool
> +                               Name="VCXMLDataGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCWebServiceProxyGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCMIDLTool"
> +                       />
> +                       <Tool
> +                               Name="VCCLCompilerTool"
> +                               Optimization="2"
> +                               EnableIntrinsicFunctions="true"
> +
> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
> +
> PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
> +                               RuntimeLibrary="2"
> +                               EnableFunctionLevelLinking="true"
> +                               UsePrecompiledHeader="0"
> +                               WarningLevel="3"
> +                               DebugInformationFormat="3"
> +                       />
> +                       <Tool
> +                               Name="VCManagedResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCPreLinkEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCLinkerTool"
> +                               AdditionalDependencies="wininet.lib
> ws2_32.lib "
> +                               LinkIncremental="1"
> +                               GenerateDebugInformation="true"
> +                               SubSystem="1"
> +                               OptimizeReferences="2"
> +                               EnableCOMDATFolding="2"
> +                               TargetMachine="1"
> +                       />
> +                       <Tool
> +                               Name="VCALinkTool"
> +                       />
> +                       <Tool
> +                               Name="VCManifestTool"
> +                       />
> +                       <Tool
> +                               Name="VCXDCMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCBscMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCFxCopTool"
> +                       />
> +                       <Tool
> +                               Name="VCAppVerifierTool"
> +                       />
> +                       <Tool
> +                               Name="VCPostBuildEventTool"
> +                       />
> +               </Configuration>
> +       </Configurations>
> +       <References>
> +       </References>
> +       <Files>
> +               <Filter
> +                       Name="Source Files"
> +                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
> +
> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> +                       >
> +                       <File
> +                               RelativePath="..\..\..\git.c"
> +                               >
> +                       </File>
> +               </Filter>
> +               <Filter
> +                       Name="Header Files"
> +                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
> +
> UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
> +                       >
> +               </Filter>
> +               <Filter
> +                       Name="Resource Files"
> +
> Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
> +
> UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
> +                       >
> +               </Filter>
> +       </Files>
> +       <Globals>
> +       </Globals>
> +</VisualStudioProject>
> diff --git a/compat/vcbuild/libgit/libgit.vcproj
> b/compat/vcbuild/libgit/libgit.vcproj
> new file mode 100644
> index 0000000..bbc3aed
> --- /dev/null
> +++ b/compat/vcbuild/libgit/libgit.vcproj
> @@ -0,0 +1,1347 @@
> +<?xml version="1.0" encoding="gb2312"?>
> +<VisualStudioProject
> +       ProjectType="Visual C++"
> +       Version="9.00"
> +       Name="libgit"
> +       ProjectGUID="{F6DEC8C3-B803-4A86-8848-430F08B499E3}"
> +       RootNamespace="libgit"
> +       Keyword="Win32Proj"
> +       TargetFrameworkVersion="196613"
> +       >
> +       <Platforms>
> +               <Platform
> +                       Name="Win32"
> +               />
> +       </Platforms>
> +       <ToolFiles>
> +       </ToolFiles>
> +       <Configurations>
> +               <Configuration
> +                       Name="Debug|Win32"
> +
> OutputDirectory="$(SolutionDir)$(ConfigurationName)"
> +                       IntermediateDirectory="$(ConfigurationName)"
> +                       ConfigurationType="4"
> +                       CharacterSet="0"
> +                       >
> +                       <Tool
> +                               Name="VCPreBuildEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCCustomBuildTool"
> +                       />
> +                       <Tool
> +                               Name="VCXMLDataGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCWebServiceProxyGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCMIDLTool"
> +                       />
> +                       <Tool
> +                               Name="VCCLCompilerTool"
> +                               Optimization="0"
> +                               InlineFunctionExpansion="1"
> +
> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
> +                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
> +                               MinimalRebuild="true"
> +                               BasicRuntimeChecks="3"
> +                               RuntimeLibrary="3"
> +                               UsePrecompiledHeader="0"
> +                               WarningLevel="3"
> +                               DebugInformationFormat="3"
> +                       />
> +                       <Tool
> +                               Name="VCManagedResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCPreLinkEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCLibrarianTool"
> +                       />
> +                       <Tool
> +                               Name="VCALinkTool"
> +                       />
> +                       <Tool
> +                               Name="VCXDCMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCBscMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCFxCopTool"
> +                       />
> +                       <Tool
> +                               Name="VCPostBuildEventTool"
> +                       />
> +               </Configuration>
> +               <Configuration
> +                       Name="Release|Win32"
> +
> OutputDirectory="$(SolutionDir)$(ConfigurationName)"
> +                       IntermediateDirectory="$(ConfigurationName)"
> +                       ConfigurationType="4"
> +                       CharacterSet="0"
> +                       WholeProgramOptimization="1"
> +                       >
> +                       <Tool
> +                               Name="VCPreBuildEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCCustomBuildTool"
> +                       />
> +                       <Tool
> +                               Name="VCXMLDataGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCWebServiceProxyGeneratorTool"
> +                       />
> +                       <Tool
> +                               Name="VCMIDLTool"
> +                       />
> +                       <Tool
> +                               Name="VCCLCompilerTool"
> +                               Optimization="2"
> +                               InlineFunctionExpansion="1"
> +                               EnableIntrinsicFunctions="true"
> +
> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
> +                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
> +                               RuntimeLibrary="2"
> +                               EnableFunctionLevelLinking="true"
> +                               UsePrecompiledHeader="0"
> +                               WarningLevel="3"
> +                               DebugInformationFormat="3"
> +                       />
> +                       <Tool
> +                               Name="VCManagedResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCResourceCompilerTool"
> +                       />
> +                       <Tool
> +                               Name="VCPreLinkEventTool"
> +                       />
> +                       <Tool
> +                               Name="VCLibrarianTool"
> +                       />
> +                       <Tool
> +                               Name="VCALinkTool"
> +                       />
> +                       <Tool
> +                               Name="VCXDCMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCBscMakeTool"
> +                       />
> +                       <Tool
> +                               Name="VCFxCopTool"
> +                       />
> +                       <Tool
> +                               Name="VCPostBuildEventTool"
> +                       />
> +               </Configuration>
> +       </Configurations>
> +       <References>
> +       </References>
> +       <Files>
> +               <Filter
> +                       Name="Source Files"
> +                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
> +
> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> +                       >
> +                       <File
> +                               RelativePath="..\..\msvc.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\mozilla-sha1\sha1.c"
> +                               >
> +                       </File>
> +               </Filter>
> +               <Filter
> +                       Name="Header Files"
> +                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
> +
> UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
> +                       >
> +                       <File
> +                               RelativePath="..\..\..\archive.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\attr.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\blob.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\branch.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\bundle.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\cache-tree.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\cache.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\color.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\commit.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\csum-file.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\decorate.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\delta.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diff.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diffcore.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\dir.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\exec_cmd.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\fetch-pack.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\fsck.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\git-compat-util.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\graph.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\grep.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\hash.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\help.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\http.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\levenshtein.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\list-objects.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\ll-merge.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\log-tree.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\mailmap.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\merge-recursive.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\notes.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\object.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack-refs.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack-revindex.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\parse-options.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\patch-ids.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pkt-line.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\progress.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\quote.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\reachable.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\reflog-walk.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\refs.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\remote.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\rerere.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\revision.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\run-command.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\send-pack.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sha1-lookup.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\shortlog.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sideband.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sigchain.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\strbuf.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\string-list.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tag.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tar.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\thread-utils.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\transport.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tree-walk.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tree.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\unpack-trees.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\userdiff.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\utf8.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\walker.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\wt-status.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff-interface.h"
> +                               >
> +                       </File>
> +               </Filter>
> +               <Filter
> +                       Name="Resource Files"
> +
> Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
> +
> UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
> +                       >
> +               </Filter>
> +               <Filter
> +                       Name="compat"
> +                       >
> +                       <File
> +                               RelativePath="..\..\..\compat\basename.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\cygwin.h"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\compat\fnmatch\fnmatch.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\compat\fnmatch\fnmatch.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\fopen.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\memmem.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\mingw.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\mingw.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\mkdtemp.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\mkstemps.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\pread.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\qsort.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\compat\regex\regex.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\compat\regex\regex.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\setenv.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\snprintf.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\strcasestr.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\strlcpy.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\strtoumax.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\unsetenv.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\win32.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\win32mmap.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\compat\winansi.c"
> +                               >
> +                       </File>
> +               </Filter>
> +               <Filter
> +                       Name="git"
> +                       >
> +                       <File
> +                               RelativePath="..\..\..\abspath.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\alias.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\alloc.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\archive-tar.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\archive-zip.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\archive.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\attr.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\base85.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\bisect.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\blob.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\branch.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-add.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-annotate.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-apply.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-archive.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-bisect--helper.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-blame.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-branch.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-bundle.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-cat-file.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-check-attr.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-check-ref-format.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-checkout-index.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-checkout.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-clean.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-clone.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-commit-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-commit.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-config.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-count-objects.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-describe.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-diff-files.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-diff-index.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-diff-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-diff.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-fast-export.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-fetch--tool.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-fetch-pack.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-fetch.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-fmt-merge-msg.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-for-each-ref.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-fsck.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-gc.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-grep.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-help.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-init-db.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-log.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-ls-files.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-ls-remote.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-ls-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-mailinfo.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-mailsplit.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-merge-base.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-merge-file.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-merge-ours.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-merge-recursive.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-merge.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-mktree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-mv.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-name-rev.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-pack-objects.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-pack-refs.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-prune-packed.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-prune.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-push.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-read-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-receive-pack.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-reflog.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-remote.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-rerere.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-reset.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-rev-list.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-rev-parse.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-revert.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-rm.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-send-pack.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-shortlog.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-show-branch.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-show-ref.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-stripspace.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-symbolic-ref.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-tag.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\builtin-tar-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-unpack-objects.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-update-index.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-update-ref.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-upload-archive.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-verify-pack.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-verify-tag.c"
> +                               >
> +                       </File>
> +                       <File
> +
> RelativePath="..\..\..\builtin-write-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\bundle.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\cache-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\color.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\combine-diff.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\commit.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\config.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\connect.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\convert.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\copy.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\csum-file.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\ctype.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\date.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\decorate.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diff-delta.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diff-lib.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diff-no-index.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diff.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diffcore-break.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diffcore-delta.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diffcore-order.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diffcore-pickaxe.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\diffcore-rename.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\dir.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\editor.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\entry.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\environment.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\exec_cmd.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\fsck.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\graph.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\grep.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\hash.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\help.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\ident.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\levenshtein.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\list-objects.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\ll-merge.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\lockfile.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\log-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\mailmap.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\match-trees.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\merge-file.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\merge-recursive.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\merge-tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\name-hash.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\object.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack-check.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack-refs.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack-revindex.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pack-write.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pager.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\parse-options.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\patch-delta.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\patch-ids.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\path.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pkt-line.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\preload-index.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\pretty.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\progress.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\quote.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\reachable.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\read-cache.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\reflog-walk.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\refs.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\remote.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\rerere.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\revision.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\run-command.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\server-info.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\setup.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sha1-lookup.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sha1_file.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sha1_name.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\shallow.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sideband.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\sigchain.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\strbuf.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\string-list.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\symlinks.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tag.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\thread-utils.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\trace.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\transport.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tree-diff.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tree-walk.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\tree.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\unpack-trees.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\usage.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\userdiff.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\utf8.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\walker.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\wrapper.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\write_or_die.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\ws.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\wt-status.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff-interface.c"
> +                               >
> +                       </File>
> +               </Filter>
> +               <Filter
> +                       Name="xdiff"
> +                       >
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xdiff.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xdiffi.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xdiffi.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xemit.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xemit.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xinclude.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xmacros.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xmerge.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xpatience.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xprepare.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xprepare.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xtypes.h"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xutils.c"
> +                               >
> +                       </File>
> +                       <File
> +                               RelativePath="..\..\..\xdiff\xutils.h"
> +                               >
> +                       </File>
> +               </Filter>
> +       </Files>
> +       <Globals>
> +       </Globals>
> +</VisualStudioProject>
> --
> 1.6.4.msysgit.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Thiago Farina· Aug 17, 2009, 22:29 UTC · re: Thiago Farina · lore

Re: [PATCH 10/11] Add MSVC Project file

What about the common-cmds.h that is included in builtin-help.c? How it will be generated? I followed the instructions in ReadMe, then I can't compile because of this "missing" file.

On Mon, Aug 17, 2009 at 7:27 PM, Thiago Farina <tfransosi@gmail.com> wrote:
Show 1651 quoted lines
> What about the common-cmds.h that is included in builtin-help.c? How it
> will be generated?
> I followed the instructions in ReadMe, then I can't compile because of this
> "missing" file.
>
> On Mon, Aug 17, 2009 at 1:05 PM, Frank Li <lznuaa@gmail.com> wrote:
>
>> Add libgit.vcproj to build common library.
>> Add git.vcproj to build git program.
>>
>> Signed-off-by: Frank Li <lznuaa@gmail.com>
>> ---
>>  compat/vcbuild/git/git.vcproj       |  197 +++++
>>  compat/vcbuild/libgit/libgit.vcproj | 1347
>> +++++++++++++++++++++++++++++++++++
>>  2 files changed, 1544 insertions(+), 0 deletions(-)
>>  create mode 100644 compat/vcbuild/git/git.vcproj
>>  create mode 100644 compat/vcbuild/libgit/libgit.vcproj
>>
>> diff --git a/compat/vcbuild/git/git.vcproj b/compat/vcbuild/git/git.vcproj
>> new file mode 100644
>> index 0000000..6f85de3
>> --- /dev/null
>> +++ b/compat/vcbuild/git/git.vcproj
>> @@ -0,0 +1,197 @@
>> +<?xml version="1.0" encoding="gb2312"?>
>> +<VisualStudioProject
>> +       ProjectType="Visual C++"
>> +       Version="9.00"
>> +       Name="git"
>> +       ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
>> +       RootNamespace="git"
>> +       Keyword="Win32Proj"
>> +       TargetFrameworkVersion="196613"
>> +       >
>> +       <Platforms>
>> +               <Platform
>> +                       Name="Win32"
>> +               />
>> +       </Platforms>
>> +       <ToolFiles>
>> +       </ToolFiles>
>> +       <Configurations>
>> +               <Configuration
>> +                       Name="Debug|Win32"
>> +
>> OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
>> +                       IntermediateDirectory="$(ConfigurationName)"
>> +                       ConfigurationType="1"
>> +                       CharacterSet="0"
>> +                       >
>> +                       <Tool
>> +                               Name="VCPreBuildEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCustomBuildTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXMLDataGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCWebServiceProxyGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCMIDLTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCLCompilerTool"
>> +                               Optimization="0"
>> +
>> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
>> +
>> PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
>> +                               MinimalRebuild="true"
>> +                               BasicRuntimeChecks="3"
>> +                               RuntimeLibrary="3"
>> +                               UsePrecompiledHeader="0"
>> +                               WarningLevel="3"
>> +                               DebugInformationFormat="4"
>> +                       />
>> +                       <Tool
>> +                               Name="VCManagedResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPreLinkEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCLinkerTool"
>> +                               AdditionalDependencies="wininet.lib
>> ws2_32.lib "
>> +                               LinkIncremental="2"
>> +                               GenerateDebugInformation="true"
>> +                               SubSystem="1"
>> +                               TargetMachine="1"
>> +                       />
>> +                       <Tool
>> +                               Name="VCALinkTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCManifestTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXDCMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCBscMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCFxCopTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCAppVerifierTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPostBuildEventTool"
>> +                       />
>> +               </Configuration>
>> +               <Configuration
>> +                       Name="Release|Win32"
>> +
>> OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
>> +                       IntermediateDirectory="$(ConfigurationName)"
>> +                       ConfigurationType="1"
>> +                       CharacterSet="0"
>> +                       WholeProgramOptimization="1"
>> +                       >
>> +                       <Tool
>> +                               Name="VCPreBuildEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCustomBuildTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXMLDataGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCWebServiceProxyGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCMIDLTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCLCompilerTool"
>> +                               Optimization="2"
>> +                               EnableIntrinsicFunctions="true"
>> +
>> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
>> +
>> PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
>> +                               RuntimeLibrary="2"
>> +                               EnableFunctionLevelLinking="true"
>> +                               UsePrecompiledHeader="0"
>> +                               WarningLevel="3"
>> +                               DebugInformationFormat="3"
>> +                       />
>> +                       <Tool
>> +                               Name="VCManagedResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPreLinkEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCLinkerTool"
>> +                               AdditionalDependencies="wininet.lib
>> ws2_32.lib "
>> +                               LinkIncremental="1"
>> +                               GenerateDebugInformation="true"
>> +                               SubSystem="1"
>> +                               OptimizeReferences="2"
>> +                               EnableCOMDATFolding="2"
>> +                               TargetMachine="1"
>> +                       />
>> +                       <Tool
>> +                               Name="VCALinkTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCManifestTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXDCMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCBscMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCFxCopTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCAppVerifierTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPostBuildEventTool"
>> +                       />
>> +               </Configuration>
>> +       </Configurations>
>> +       <References>
>> +       </References>
>> +       <Files>
>> +               <Filter
>> +                       Name="Source Files"
>> +                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
>> +
>> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>> +                       >
>> +                       <File
>> +                               RelativePath="..\..\..\git.c"
>> +                               >
>> +                       </File>
>> +               </Filter>
>> +               <Filter
>> +                       Name="Header Files"
>> +                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
>> +
>> UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>> +                       >
>> +               </Filter>
>> +               <Filter
>> +                       Name="Resource Files"
>> +
>> Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
>> +
>> UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>> +                       >
>> +               </Filter>
>> +       </Files>
>> +       <Globals>
>> +       </Globals>
>> +</VisualStudioProject>
>> diff --git a/compat/vcbuild/libgit/libgit.vcproj
>> b/compat/vcbuild/libgit/libgit.vcproj
>> new file mode 100644
>> index 0000000..bbc3aed
>> --- /dev/null
>> +++ b/compat/vcbuild/libgit/libgit.vcproj
>> @@ -0,0 +1,1347 @@
>> +<?xml version="1.0" encoding="gb2312"?>
>> +<VisualStudioProject
>> +       ProjectType="Visual C++"
>> +       Version="9.00"
>> +       Name="libgit"
>> +       ProjectGUID="{F6DEC8C3-B803-4A86-8848-430F08B499E3}"
>> +       RootNamespace="libgit"
>> +       Keyword="Win32Proj"
>> +       TargetFrameworkVersion="196613"
>> +       >
>> +       <Platforms>
>> +               <Platform
>> +                       Name="Win32"
>> +               />
>> +       </Platforms>
>> +       <ToolFiles>
>> +       </ToolFiles>
>> +       <Configurations>
>> +               <Configuration
>> +                       Name="Debug|Win32"
>> +
>> OutputDirectory="$(SolutionDir)$(ConfigurationName)"
>> +                       IntermediateDirectory="$(ConfigurationName)"
>> +                       ConfigurationType="4"
>> +                       CharacterSet="0"
>> +                       >
>> +                       <Tool
>> +                               Name="VCPreBuildEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCustomBuildTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXMLDataGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCWebServiceProxyGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCMIDLTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCLCompilerTool"
>> +                               Optimization="0"
>> +                               InlineFunctionExpansion="1"
>> +
>> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
>> +
>> PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
>> +                               MinimalRebuild="true"
>> +                               BasicRuntimeChecks="3"
>> +                               RuntimeLibrary="3"
>> +                               UsePrecompiledHeader="0"
>> +                               WarningLevel="3"
>> +                               DebugInformationFormat="3"
>> +                       />
>> +                       <Tool
>> +                               Name="VCManagedResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPreLinkEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCLibrarianTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCALinkTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXDCMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCBscMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCFxCopTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPostBuildEventTool"
>> +                       />
>> +               </Configuration>
>> +               <Configuration
>> +                       Name="Release|Win32"
>> +
>> OutputDirectory="$(SolutionDir)$(ConfigurationName)"
>> +                       IntermediateDirectory="$(ConfigurationName)"
>> +                       ConfigurationType="4"
>> +                       CharacterSet="0"
>> +                       WholeProgramOptimization="1"
>> +                       >
>> +                       <Tool
>> +                               Name="VCPreBuildEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCustomBuildTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXMLDataGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCWebServiceProxyGeneratorTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCMIDLTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCCLCompilerTool"
>> +                               Optimization="2"
>> +                               InlineFunctionExpansion="1"
>> +                               EnableIntrinsicFunctions="true"
>> +
>> AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
>> +
>> PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
>> +                               RuntimeLibrary="2"
>> +                               EnableFunctionLevelLinking="true"
>> +                               UsePrecompiledHeader="0"
>> +                               WarningLevel="3"
>> +                               DebugInformationFormat="3"
>> +                       />
>> +                       <Tool
>> +                               Name="VCManagedResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCResourceCompilerTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPreLinkEventTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCLibrarianTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCALinkTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCXDCMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCBscMakeTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCFxCopTool"
>> +                       />
>> +                       <Tool
>> +                               Name="VCPostBuildEventTool"
>> +                       />
>> +               </Configuration>
>> +       </Configurations>
>> +       <References>
>> +       </References>
>> +       <Files>
>> +               <Filter
>> +                       Name="Source Files"
>> +                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
>> +
>> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>> +                       >
>> +                       <File
>> +                               RelativePath="..\..\msvc.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\mozilla-sha1\sha1.c"
>> +                               >
>> +                       </File>
>> +               </Filter>
>> +               <Filter
>> +                       Name="Header Files"
>> +                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
>> +
>> UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>> +                       >
>> +                       <File
>> +                               RelativePath="..\..\..\archive.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\attr.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\blob.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\branch.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\bundle.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\cache-tree.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\cache.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\color.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\commit.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\csum-file.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\decorate.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\delta.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diff.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diffcore.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\dir.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\exec_cmd.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\fetch-pack.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\fsck.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\git-compat-util.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\graph.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\grep.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\hash.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\help.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\http.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\levenshtein.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\list-objects.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\ll-merge.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\log-tree.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\mailmap.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\merge-recursive.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\notes.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\object.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack-refs.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack-revindex.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\parse-options.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\patch-ids.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pkt-line.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\progress.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\quote.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\reachable.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\reflog-walk.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\refs.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\remote.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\rerere.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\revision.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\run-command.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\send-pack.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sha1-lookup.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\shortlog.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sideband.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sigchain.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\strbuf.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\string-list.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tag.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tar.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\thread-utils.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\transport.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tree-walk.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tree.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\unpack-trees.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\userdiff.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\utf8.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\walker.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\wt-status.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff-interface.h"
>> +                               >
>> +                       </File>
>> +               </Filter>
>> +               <Filter
>> +                       Name="Resource Files"
>> +
>> Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
>> +
>> UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>> +                       >
>> +               </Filter>
>> +               <Filter
>> +                       Name="compat"
>> +                       >
>> +                       <File
>> +                               RelativePath="..\..\..\compat\basename.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\cygwin.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\compat\fnmatch\fnmatch.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\compat\fnmatch\fnmatch.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\fopen.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\memmem.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\mingw.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\mingw.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\mkdtemp.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\mkstemps.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\pread.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\qsort.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\compat\regex\regex.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\compat\regex\regex.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\setenv.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\snprintf.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\compat\strcasestr.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\strlcpy.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\strtoumax.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\unsetenv.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\win32.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\win32mmap.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\compat\winansi.c"
>> +                               >
>> +                       </File>
>> +               </Filter>
>> +               <Filter
>> +                       Name="git"
>> +                       >
>> +                       <File
>> +                               RelativePath="..\..\..\abspath.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\alias.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\alloc.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\archive-tar.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\archive-zip.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\archive.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\attr.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\base85.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\bisect.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\blob.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\branch.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-add.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-annotate.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-apply.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-archive.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-bisect--helper.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-blame.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-branch.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-bundle.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-cat-file.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-check-attr.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-check-ref-format.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-checkout-index.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-checkout.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-clean.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-clone.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-commit-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-commit.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-config.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-count-objects.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-describe.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-diff-files.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-diff-index.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-diff-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-diff.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-fast-export.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-fetch--tool.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-fetch-pack.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-fetch.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-fmt-merge-msg.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-for-each-ref.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-fsck.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-gc.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-grep.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-help.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-init-db.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-log.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-ls-files.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-ls-remote.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-ls-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-mailinfo.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-mailsplit.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-merge-base.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-merge-file.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-merge-ours.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-merge-recursive.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-merge.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-mktree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-mv.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-name-rev.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-pack-objects.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-pack-refs.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-prune-packed.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-prune.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-push.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-read-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-receive-pack.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-reflog.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-remote.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-rerere.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-reset.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-rev-list.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-rev-parse.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-revert.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-rm.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-send-pack.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-shortlog.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-show-branch.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-show-ref.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-stripspace.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-symbolic-ref.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-tag.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\builtin-tar-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-unpack-objects.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-update-index.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-update-ref.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-upload-archive.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-verify-pack.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-verify-tag.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +
>> RelativePath="..\..\..\builtin-write-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\bundle.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\cache-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\color.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\combine-diff.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\commit.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\config.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\connect.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\convert.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\copy.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\csum-file.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\ctype.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\date.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\decorate.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diff-delta.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diff-lib.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diff-no-index.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diff.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diffcore-break.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diffcore-delta.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diffcore-order.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diffcore-pickaxe.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\diffcore-rename.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\dir.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\editor.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\entry.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\environment.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\exec_cmd.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\fsck.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\graph.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\grep.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\hash.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\help.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\ident.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\levenshtein.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\list-objects.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\ll-merge.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\lockfile.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\log-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\mailmap.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\match-trees.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\merge-file.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\merge-recursive.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\merge-tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\name-hash.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\object.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack-check.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack-refs.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack-revindex.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pack-write.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pager.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\parse-options.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\patch-delta.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\patch-ids.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\path.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pkt-line.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\preload-index.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\pretty.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\progress.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\quote.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\reachable.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\read-cache.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\reflog-walk.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\refs.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\remote.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\rerere.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\revision.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\run-command.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\server-info.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\setup.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sha1-lookup.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sha1_file.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sha1_name.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\shallow.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sideband.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\sigchain.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\strbuf.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\string-list.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\symlinks.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tag.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\thread-utils.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\trace.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\transport.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tree-diff.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tree-walk.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\tree.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\unpack-trees.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\usage.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\userdiff.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\utf8.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\walker.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\wrapper.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\write_or_die.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\ws.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\wt-status.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff-interface.c"
>> +                               >
>> +                       </File>
>> +               </Filter>
>> +               <Filter
>> +                       Name="xdiff"
>> +                       >
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xdiff.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xdiffi.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xdiffi.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xemit.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xemit.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xinclude.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xmacros.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xmerge.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xpatience.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xprepare.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xprepare.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xtypes.h"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xutils.c"
>> +                               >
>> +                       </File>
>> +                       <File
>> +                               RelativePath="..\..\..\xdiff\xutils.h"
>> +                               >
>> +                       </File>
>> +               </Filter>
>> +       </Files>
>> +       <Globals>
>> +       </Globals>
>> +</VisualStudioProject>
>> --
>> 1.6.4.msysgit.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
Johannes Schindelin· Aug 17, 2009, 22:39 UTC · re: Thiago Farina · lore

Re: [PATCH 10/11] Add MSVC Project file

Hi,
On Mon, 17 Aug 2009, Thiago Farina wrote:
> What about the common-cmds.h that is included in builtin-help.c? How it will
> be generated?
> I followed the instructions in ReadMe, then I can't compile because of this
> "missing" file.

Thiago, you do not want to top-post in both of the mailing-lists you sent to. And you certainly do _not_ want to send 200K of unanswered, quoted text:

> On Mon, Aug 17, 2009 at 1:05 PM, Frank Li <lznuaa@gmail.com> wrote:
>
> [200K that were not needed for Thiago's question]

Sorry, but I do not feel inclined to respond to your question if you do not want to adher to netiquette that you must have seen when you first posted to the msysGit mailing list.

Ciao, Dscho

Thiago Farina· Aug 17, 2009, 22:50 UTC · re: Johannes Schindelin · lore

Re: [PATCH 10/11] Add MSVC Project file

On Mon, Aug 17, 2009 at 7:39 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 13 quoted lines
> Hi,
>
> On Mon, 17 Aug 2009, Thiago Farina wrote:
>
>> What about the common-cmds.h that is included in builtin-help.c? How it will
>> be generated?
>> I followed the instructions in ReadMe, then I can't compile because of this
>> "missing" file.
>
> Thiago, you do not want to top-post in both of the mailing-lists you sent
> to.  And you certainly do _not_ want to send 200K of unanswered, quoted
> text:
>
I tried to don't do this(top-post), but things goes bad again .
Show 12 quoted lines
>> On Mon, Aug 17, 2009 at 1:05 PM, Frank Li <lznuaa@gmail.com> wrote:
>>
>> [200K that were not needed for Thiago's question]
>
> Sorry, but I do not feel inclined to respond to your question if you do
> not want to adher to netiquette that you must have seen when you first
> posted to the msysGit mailing list.
>
> Ciao,
> Dscho
>
>
Johannes Schindelin· Aug 17, 2009, 17:09 UTC · re: Frank Li · lore

Re: [PATCH 09/11] Add MSVC porting header files.

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
> Add unix head file, dirent.h, unistd.h  and time.h
These are copied from somewhere.  From where?  What is the license?
> Add MSVC special porting head file msvc.h and msvc.c.
This is added by you.  Logically, that should be a separate patch.
Show 46 quoted lines
> diff --git a/compat/msvc.h b/compat/msvc.h
> new file mode 100644
> index 0000000..6071565
> --- /dev/null
> +++ b/compat/msvc.h
> @@ -0,0 +1,95 @@
> +#ifndef __MSVC__HEAD
> +#define __MSVC__HEAD
> +
> +#define WINVER 0x0500
> +#define _WIN32_WINNT 0x0500
> +#define _WIN32_WINDOWS 0x0410
> +#define _WIN32_IE 0x0700
> +#define NTDDI_VERSION NTDDI_WIN2KSP1
> +#include <winsock2.h>
> +
> +/*Configuration*/
> +
> +#define NO_PREAD
> +#define NO_OPENSSL
> +#define NO_LIBGEN_H
> +#define NO_SYMLINK_HEAD
> +#define NO_IPV6
> +#define NO_SETENV
> +#define NO_UNSETENV
> +#define NO_STRCASESTR
> +#define NO_STRLCPY
> +#define NO_MEMMEM
> +#define NO_C99_FORMAT
> +#define NO_STRTOUMAX
> +#define NO_MKDTEMP
> +#define NO_MKSTEMPS
> +
> +#define RUNTIME_PREFIX
> +#define NO_ST_BLOCKS_IN_STRUCT_STAT
> +#define NO_NSEC
> +#define USE_WIN32_MMAP
> +#define USE_NED_ALLOCATOR
> +
> +#define NO_REGEX
> +
> +#define NO_SYS_SELECT_H
> +#define NO_PTHEADS
> +#define HAVE_STRING_H 1
> +#define STDC_HEADERS
> +#define NO_ICONV

These would normally be defined in the Makefile. You might want to state that in a comment.

Or maybe move the definitions (along with vsnprintf) to the .vcproj file, which is the logical pendant of the Makefile?

> +#define inline __inline
> +#define __inline__ __inline

These definitions are unrelated to the surrounding ones; please move them elsewhere.

Show 27 quoted lines
> +
> +#define SNPRINTF_RETURNS_BOGUS
> +
> +#define SHA1_HEADER "mozilla-sha1\\sha1.h"
> +
> +#define ETC_GITCONFIG "%HOME%"
> +
> +#define NO_PTHREADS
> +#define NO_CURL
> +
> +
> +#define NO_STRTOUMAX
> +#define REGEX_MALLOC
> +
> +
> +#define GIT_EXEC_PATH "bin"
> +#define GIT_VERSION "1.6"
> +#define BINDIR "bin"
> +#define PREFIX "."
> +#define GIT_MAN_PATH "man"
> +#define GIT_INFO_PATH "info"
> +#define GIT_HTML_PATH "html"
> +#define DEFAULT_GIT_TEMPLATE_DIR "templates"
> +
> +#define NO_STRLCPY
> +#define NO_UNSETENV
> +#define NO_SETENV
Would these NO_ definitions not _love_ to be close to their siblings?

What is the reason for those empty lines? Their placement and amount look rather arbitrary to me.

Show 7 quoted lines
> +#define strdup _strdup
> +#define read _read
> +#define close _close
> +#define dup _dup
> +#define dup2 _dup2
> +#define strncasecmp _strnicmp
> +#define strtoull _strtoui64
vsnprintf could go right here.
> +#define __attribute__(x)
The two inline definitions could go right here.
Show 14 quoted lines
> +static __inline int strcasecmp (const char *s1, const char *s2)
> +{
> +	int size1=strlen(s1);
> +	int sisz2=strlen(s2);
> +
> +	return _strnicmp(s1,s2,sisz2>size1?sisz2:size1);
> +}
> +
> +#include "compat/mingw.h"
> +#undef ERROR
> +#undef stat
> +#define stat(x,y) mingw_lstat
> +#define stat      _stat64
> +#endif
Looks much nicer now, thanks!

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 19:31 UTC · re: Johannes Schindelin · lore

Re: [PATCH 09/11] Add MSVC porting header files.

Show 52 quoted lines
>> diff --git a/compat/msvc.h b/compat/msvc.h
>> new file mode 100644
>> index 0000000..6071565
>> --- /dev/null
>> +++ b/compat/msvc.h
>> @@ -0,0 +1,95 @@
>> +#ifndef __MSVC__HEAD
>> +#define __MSVC__HEAD
>> +
>> +#define WINVER 0x0500
>> +#define _WIN32_WINNT 0x0500
>> +#define _WIN32_WINDOWS 0x0410
>> +#define _WIN32_IE 0x0700
>> +#define NTDDI_VERSION NTDDI_WIN2KSP1
>> +#include <winsock2.h>
>> +
>> +/*Configuration*/
>> +
>> +#define NO_PREAD
>> +#define NO_OPENSSL
>> +#define NO_LIBGEN_H
>> +#define NO_SYMLINK_HEAD
>> +#define NO_IPV6
>> +#define NO_SETENV
>> +#define NO_UNSETENV
>> +#define NO_STRCASESTR
>> +#define NO_STRLCPY
>> +#define NO_MEMMEM
>> +#define NO_C99_FORMAT
>> +#define NO_STRTOUMAX
>> +#define NO_MKDTEMP
>> +#define NO_MKSTEMPS
>> +
>> +#define RUNTIME_PREFIX
>> +#define NO_ST_BLOCKS_IN_STRUCT_STAT
>> +#define NO_NSEC
>> +#define USE_WIN32_MMAP
>> +#define USE_NED_ALLOCATOR
>> +
>> +#define NO_REGEX
>> +
>> +#define NO_SYS_SELECT_H
>> +#define NO_PTHEADS
>> +#define HAVE_STRING_H 1
>> +#define STDC_HEADERS
>> +#define NO_ICONV
>
> These would normally be defined in the Makefile.  You might want to state
> that in a comment.
>
> Or maybe move the definitions (along with vsnprintf) to the .vcproj file,
> which is the logical pendant of the Makefile?

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Schindelin· Aug 17, 2009, 19:48 UTC · re: Pau Garcia i Quiles · lore

CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

Hi,
On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
Show 5 quoted lines
> What about having a CMake build system, which would work on every
> platform (including cross-compiling), and would produce an appropriate
> config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever
> is fit for each platform? If it's OK to include such a build system
> upstream, I'm volunteering to implement it.
And reap in another dependency?

First Python, then CMake, what tomorrow? Is it the month of adding dependencies?

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 19:51 UTC · re: Johannes Schindelin · lore

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

On Mon, Aug 17, 2009 at 9:48 PM, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:

Show 12 quoted lines
> On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
>
>> What about having a CMake build system, which would work on every
>> platform (including cross-compiling), and would produce an appropriate
>> config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever
>> is fit for each platform? If it's OK to include such a build system
>> upstream, I'm volunteering to implement it.
>
> And reap in another dependency?
>
> First Python, then CMake, what tomorrow?  Is it the month of adding
> dependencies?
I'd say it's the month of getting problems solved.

CMake would make git a lot easier to build on Windows, particularly with Visual C++. Replace autotools with CMake and suddenly you need to maintain a single build system for every platform and compiler git supports/will support. That's a sound advantage to me.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Pau Garcia i Quiles· Aug 17, 2009, 19:54 UTC · re: Pau Garcia i Quiles · lore

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

On Mon, Aug 17, 2009 at 9:51 PM, Pau Garcia i Quiles<pgquiles@elpauer.org> wrote:

Show 22 quoted lines
> On Mon, Aug 17, 2009 at 9:48 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>
>> On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
>>
>>> What about having a CMake build system, which would work on every
>>> platform (including cross-compiling), and would produce an appropriate
>>> config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever
>>> is fit for each platform? If it's OK to include such a build system
>>> upstream, I'm volunteering to implement it.
>>
>> And reap in another dependency?
>>
>> First Python, then CMake, what tomorrow?  Is it the month of adding
>> dependencies?
>
> I'd say it's the month of getting problems solved.
>
> CMake would make git a lot easier to build on Windows, particularly
> with Visual C++. Replace autotools with CMake and suddenly you need to
> maintain a single build system for every platform and compiler git
> supports/will support. That's a sound advantage to me.

I forgot to say CMake would be a build-dependency, not a runtime dependency, in case anyone is wondering.

More info about CMake: http://www.cmake.org

Tutorial: http://www.elpauer.org/stuff/learning_cmake.pdf

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Schindelin· Aug 17, 2009, 20:58 UTC · re: Pau Garcia i Quiles · lore

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

Hi,
On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
Show 17 quoted lines
> On Mon, Aug 17, 2009 at 9:48 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
> 
> > On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
> >
> >> What about having a CMake build system, which would work on every
> >> platform (including cross-compiling), and would produce an appropriate
> >> config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever
> >> is fit for each platform? If it's OK to include such a build system
> >> upstream, I'm volunteering to implement it.
> >
> > And reap in another dependency?
> >
> > First Python, then CMake, what tomorrow?  Is it the month of adding
> > dependencies?
> 
> I'd say it's the month of getting problems solved.
What?  I beg your _pardon_?
> CMake would make git a lot easier to build on Windows, particularly with 
> Visual C++. Replace autotools with CMake and suddenly you need to 
> maintain a single build system for every platform and compiler git 
> supports/will support. That's a sound advantage to me.

Well, I heard some pretty different opinions, and they are from quite recently.

In any case, before you get CMake to compile in msysGit, I think we do not need to talk about getting problems solved.

Ciao, Dscho

Pau Garcia i Quiles· Aug 17, 2009, 21:03 UTC · re: Johannes Schindelin · lore

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

> In any case, before you get CMake to compile in msysGit, I think we do not
> need to talk about getting problems solved.

At this moment I feel like developing a CMake build system for git would be a waste of time, it would never be accepted upstream. I'm not sure I want to spend my time in such an effort (it would easily take 2-3 days full time) and see it trashed. Sorry for being so clear, but I tend to contribute only to projects where my help and time are appreciated.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Reece Dunn· Aug 17, 2009, 21:20 UTC · re: Pau Garcia i Quiles · lore

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

2009/8/17 Pau Garcia i Quiles <pgquiles@elpauer.org>:
Show 22 quoted lines
> On Mon, Aug 17, 2009 at 9:48 PM, Johannes
> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>
>> On Mon, 17 Aug 2009, Pau Garcia i Quiles wrote:
>>
>>> What about having a CMake build system, which would work on every
>>> platform (including cross-compiling), and would produce an appropriate
>>> config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever
>>> is fit for each platform? If it's OK to include such a build system
>>> upstream, I'm volunteering to implement it.
>>
>> And reap in another dependency?
>>
>> First Python, then CMake, what tomorrow?  Is it the month of adding
>> dependencies?
>
> I'd say it's the month of getting problems solved.
>
> CMake would make git a lot easier to build on Windows, particularly
> with Visual C++. Replace autotools with CMake and suddenly you need to
> maintain a single build system for every platform and compiler git
> supports/will support. That's a sound advantage to me.

Realistically, you'd need CMake for Windows/msvc and autotools for POSIX systems. I know that CMake is supported on POSIX, but not everyone has access to it. Poppler, for example, has this dual build system to support Windows as well as other systems (that, and it has KDE4 bindings, so CMake is pretty much a given).

For CMake to work, it would need to support building all of git (including the man, html and pdf documents from the asciidoc sources), the localisation support and the optional packages (OpenSSL, CURL). I know that KDE uses CMake, so this should all be possible.

- Reece
Pau Garcia i Quiles· Aug 17, 2009, 21:29 UTC · re: Reece Dunn · lore

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

On Mon, Aug 17, 2009 at 11:20 PM, Reece Dunn<msclrhd@googlemail.com> wrote:
Show 5 quoted lines
> Realistically, you'd need CMake for Windows/msvc and autotools for
> POSIX systems. I know that CMake is supported on POSIX, but not
> everyone has access to it. Poppler, for example, has this dual build
> system to support Windows as well as other systems (that, and it has
> KDE4 bindings, so CMake is pretty much a given).

It's not exactly like that. It would be more accurate to say "if you have POSIX, CMake will work; if you don't have POSIX, it may or may not work".

I'd say 99% of git users run git on a platform which supports enough POSIX to build CMake.

Please note if you are cross-compiling git, you need CMake (hence POSIX) on the platform you are cross-compiling on (the "host platform"), not on the platform you are cross-compiling for (the "target platform").

> For CMake to work, it would need to support building all of git
> (including the man, html and pdf documents from the asciidoc sources),
> the localisation support and the optional packages (OpenSSL, CURL). I
> know that KDE uses CMake, so this should all be possible.

All possible. Plus using CMake would make easier to build installers (NSIS, WiX, .deb, .rpm, etc), submit the results of the tests to a dashboard ( http://my.cdash.org/ ), and more.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
Johannes Sixt· Aug 17, 2009, 20:07 UTC · re: Pau Garcia i Quiles · lore

Re: [msysGit] Re: [PATCH 09/11] Add MSVC porting header files.

On Montag, 17. August 2009, Pau Garcia i Quiles wrote:
> What about having a CMake build system, ...

No, thank you. I have to use it for the little bit of KDE development that I do, and it is a horror. With autotools I at least was able to reuse my shell programming skills, but cmake is an entirely new language, and an absolutely horrible one (IMHO, of course).

-- Hannes
Frank Li· Aug 18, 2009, 02:15 UTC · re: Johannes Schindelin · lore

Re: [PATCH 09/11] Add MSVC porting header files.

>> Add unix head file, dirent.h, unistd.h  and time.h
>
> These are copied from somewhere.  From where?  What is the license?
It comes from msys,  which used to build msysgit.
>> Add MSVC special porting head file msvc.h and msvc.c.
>
> This is added by you.  Logically, that should be a separate patch.
Okay I will split.
Show 25 quoted lines
>> +#define NO_MEMMEM
>> +#define NO_C99_FORMAT
>> +#define NO_STRTOUMAX
>> +#define NO_MKDTEMP
>> +#define NO_MKSTEMPS
>> +
>> +#define RUNTIME_PREFIX
>> +#define NO_ST_BLOCKS_IN_STRUCT_STAT
>> +#define NO_NSEC
>> +#define USE_WIN32_MMAP
>> +#define USE_NED_ALLOCATOR
>> +
>> +#define NO_REGEX
>> +
>> +#define NO_SYS_SELECT_H
>> +#define NO_PTHEADS
>> +#define HAVE_STRING_H 1
>> +#define STDC_HEADERS
>> +#define NO_ICONV
>
> These would normally be defined in the Makefile.  You might want to state
> that in a comment.
>
> Or maybe move the definitions (along with vsnprintf) to the .vcproj file,
> which is the logical pendant of the Makefile?

I really want to in .vcproj. but the same context needs to copy DEBUG\RELEASE 32\64bit, libgit.vcproj and git.vcproj. 8 place needs copy. To avoid copy in vcproj file, I move it hear.

Johannes Schindelin· Aug 18, 2009, 09:47 UTC · re: Frank Li · lore

Re: [PATCH 09/11] Add MSVC porting header files.

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
Show 5 quoted lines
> >> Add unix head file, dirent.h, unistd.h  and time.h
> >
> > These are copied from somewhere.  From where?  What is the license?
> 
> It comes from msys,  which used to build msysgit.

I know. After reading the patch. But it would be better if everybody knew after reading the commit message... _Especially_ in this increasingly lawsuit-defined business, it is very nice to see early that the files you are including here are in the public domain, and come from MSys.

> I really want to in .vcproj.  but the same context needs to copy
> DEBUG\RELEASE 32\64bit, libgit.vcproj and git.vcproj. 8 place needs
> copy.  To avoid copy in vcproj file, I move it hear.

As I said earlier, there are common flags, but as I also said, it is probably better to keep the #define's in a header file for better visibility and editability, albeit in logically clustered blocks (i.e. all the NO_* and other #define's that affect what source code is compiled, all default paths in another cluster, #define's to bow before Microsoft's C runtime's decision to deprecate the C99 standard function names, etc)

BTW it is funny that your typos seem to be influenced by the _sound_ of the word ("hear" instead of "here"), rather than just simple transposed letters... most of my typos are the same ;-)

Ciao, Dscho

Junio C Hamano· Aug 18, 2009, 10:42 UTC · re: Johannes Schindelin · lore

Re: [PATCH 09/11] Add MSVC porting header files.

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 15 quoted lines
> Hi,
>
> On Tue, 18 Aug 2009, Frank Li wrote:
>
>> >> Add unix head file, dirent.h, unistd.h  and time.h
>> >
>> > These are copied from somewhere.  From where?  What is the license?
>> 
>> It comes from msys,  which used to build msysgit.
>
> I know.  After reading the patch.  But it would be better if everybody 
> knew after reading the commit message...  _Especially_ in this 
> increasingly lawsuit-defined business, it is very nice to see early that 
> the files you are including here are in the public domain, and come from 
> MSys.
And there was this line in the snarfed file:
    * No warranty is given; refer to the file DISCLAIMER within the package.

but there no DISCLAIMER file (perhaps a separate patch added it, but I somehow doubt it).

Show 7 quoted lines
> As I said earlier, there are common flags, but as I also said, it is 
> probably better to keep the #define's in a header file for better 
> visibility and editability, albeit in logically clustered blocks (i.e. all 
> the NO_* and other #define's that affect what source code is 
> compiled, all default paths in another cluster, #define's to bow before 
> Microsoft's C runtime's decision to deprecate the C99 standard function 
> names, etc)

... and that can live in a separate header file to reduce clutter and shield people who do not need to look at MSC related code, no?

Johannes Schindelin· Aug 18, 2009, 13:01 UTC · re: Junio C Hamano · lore

Re: [PATCH 09/11] Add MSVC porting header files.

Hi,
On Tue, 18 Aug 2009, Junio C Hamano wrote:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > As I said earlier, there are common flags, but as I also said, it is 
> > probably better to keep the #define's in a header file for better 
> > visibility and editability, albeit in logically clustered blocks (i.e. 
> > all the NO_* and other #define's that affect what source code is 
> > compiled, all default paths in another cluster, #define's to bow 
> > before Microsoft's C runtime's decision to deprecate the C99 standard 
> > function names, etc)
> 
> ... and that can live in a separate header file to reduce clutter and 
> shield people who do not need to look at MSC related code, no?
Maybe we could call it compat/msvc.h? ;-)

Ciao, Dscho

Johannes Sixt· Aug 17, 2009, 19:21 UTC · re: Frank Li · lore

Re: [msysGit] [PATCH 09/11] Add MSVC porting header files.

On Montag, 17. August 2009, Frank Li wrote:
Show 7 quoted lines
> diff --git a/compat/msvc.h b/compat/msvc.h
> new file mode 100644
> index 0000000..6071565
> --- /dev/null
> +++ b/compat/msvc.h
> @@ -0,0 +1,95 @@
> +#ifndef __MSVC__HEAD
...
> +#endif
> \ No newline at end of file

Please fix these "No newline at end of file" an all cases (I quoted only one instance where I saw this).

-- Hannes
Johannes Schindelin· Aug 17, 2009, 17:01 UTC · re: Frank Li · lore

Re: [PATCH 08/11] Place __stdcall to correct position.

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
> MSVC require __stdcall is between return value and function name.
> ALL Win32 API definition is as TYPE WINAPI function name
> 
> Signed-off-by: Frank Li <lznuaa@gmail.com>

How about "... to the correct ..." and "MSVC requires _stdcall to be between return value..." and "All Win32 API functions are declared with the WINAPI attribute."?

Show 10 quoted lines
> diff --git a/compat/mingw.c b/compat/mingw.c
> index d5fa0ed..0c9c793 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -1146,7 +1146,7 @@ void mingw_open_html(const char *unixpath)
>  
>  int link(const char *oldpath, const char *newpath)
>  {
> -	typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
> +	typedef  BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
An extra space slipped in, there.
Show 16 quoted lines
> diff --git a/run-command.c b/run-command.c
> index df139da..423b506 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -295,12 +295,12 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
>  }
>  
>  #if defined(__MINGW32__) || defined(_MSC_VER)
> -static __stdcall unsigned run_thread(void *data)
> +static unsigned __stdcall run_thread(void *data)
>  {
>  	struct async *async = data;
>  	return async->proc(async->fd_for_proc, async->data);
>  }
> -#endif
> +#endif /* __MINGW32__ || _MSC_VER */

I do not think this is necessary. There are only 5 lines wrapped into those #ifdef guards, the developer should be able to see that far.

Ciao, Dscho

Frank Li· Aug 18, 2009, 01:51 UTC · re: Johannes Schindelin · lore

Re: [PATCH 08/11] Place __stdcall to correct position.

> How about "... to the correct ..." and "MSVC requires _stdcall to be
> between return value..." and "All Win32 API functions are declared with
> the WINAPI attribute."?
WINAPI always like

BOOL WINAPI function_name(xxx); It compile fail if WINAPI BOOL function_name(xxx);

Show 13 quoted lines
>>  #if defined(__MINGW32__) || defined(_MSC_VER)
>> -static __stdcall unsigned run_thread(void *data)
>> +static unsigned __stdcall run_thread(void *data)
>>  {
>>       struct async *async = data;
>>       return async->proc(async->fd_for_proc, async->data);
>>  }
>> -#endif
>> +#endif /* __MINGW32__ || _MSC_VER */
>
> I do not think this is necessary.  There are only 5 lines wrapped into
> those #ifdef guards, the developer should be able to see that far.
>
Do you means remove /* __MINGW32__ || _MSC_VER */?
Johannes Schindelin· Aug 18, 2009, 09:36 UTC · re: Frank Li · lore

Re: [PATCH 08/11] Place __stdcall to correct position.

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
Show 8 quoted lines
> > How about "... to the correct ..." and "MSVC requires _stdcall to be
> > between return value..." and "All Win32 API functions are declared with
> > the WINAPI attribute."?
> 
> WINAPI always like
> 
> BOOL WINAPI function_name(xxx);
> It compile fail if WINAPI BOOL function_name(xxx);
Oh, okay, so let's say
	Furthermore, Microsoft Visual C++ requires the order
		BOOL WINAPI function();
	instead of
		WINAPI BOOL function();
Show 14 quoted lines
> >>  #if defined(__MINGW32__) || defined(_MSC_VER)
> >> -static __stdcall unsigned run_thread(void *data)
> >> +static unsigned __stdcall run_thread(void *data)
> >>  {
> >>       struct async *async = data;
> >>       return async->proc(async->fd_for_proc, async->data);
> >>  }
> >> -#endif
> >> +#endif /* __MINGW32__ || _MSC_VER */
> >
> > I do not think this is necessary.  There are only 5 lines wrapped into
> > those #ifdef guards, the developer should be able to see that far.
> >
> Do you means remove /* __MINGW32__ || _MSC_VER */?
I was talking about this change:
> -#endif
> +#endif /* __MINGW32__ || _MSC_VER */
which is IMHO distracting rather than helpful.

Ciao, Dscho

Johannes Schindelin· Aug 17, 2009, 16:58 UTC · re: Frank Li · lore

Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
> Windows will convert CR\LF and union code at text mode.
> Git doesn't like this. Add O_BINARY flag to open function
> 
> Signed-off-by: Frank Li <lznuaa@gmail.com>
How about this instead?
	mingw.c: Use the O_BINARY flag to open files
	On Windows, non-text files must be opened using the O_BINARY flag. 
	MinGW does this for us automatically, but Microsoft Visual C++
	does not.
	Also, Johannes said that this would be a nice cleanup.
BTW what about fopen()?
Patch is obviously good.

Ciao, Dscho

Frank Li· Aug 18, 2009, 02:02 UTC · re: Johannes Schindelin · lore

Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

Show 10 quoted lines
> How about this instead?
>
>        mingw.c: Use the O_BINARY flag to open files
>
>        On Windows, non-text files must be opened using the O_BINARY flag.
>        MinGW does this for us automatically, but Microsoft Visual C++
>        does not.
>
>        Also, Johannes said that this would be a nice cleanup.
>
Okay, Do you need me change commit comments to resubmit patch?
> BTW what about fopen()?
I never found problem at fopen, I will double check it.
Show 6 quoted lines
>
> Patch is obviously good.
>
> Ciao,
> Dscho
>
Johannes Schindelin· Aug 18, 2009, 09:40 UTC · re: Frank Li · lore

Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
Show 12 quoted lines
> > How about this instead?
> >
> >        mingw.c: Use the O_BINARY flag to open files
> >
> >        On Windows, non-text files must be opened using the O_BINARY flag.
> >        MinGW does this for us automatically, but Microsoft Visual C++
> >        does not.
> >
> >        Also, Johannes said that this would be a nice cleanup.
> >
> 
> Okay, Do you need me change commit comments to resubmit patch?

How about updating your branch at tgit.git with the new commit messages first? (Use rebase -i...)

> > BTW what about fopen()?
> 
> I never found problem at fopen, I will double check it.

Well, it is better to be sure, not by testing it, but rather by inspecting the code paths. Is there any way Git wants to open a binary file with fopen()? If so, it cannot use the modes "r" and "w" there, but must use "rb" and "wb".

It gets doubly complicated if there are code paths that _want_ to open text files (such as .git/config), which are user-writable, so they could (in theory) contain CR/LF line endings.

Ciao, Dscho

Show 8 quoted lines
>
> >
> > Patch is obviously good.
> >
> > Ciao,
> > Dscho
> >
>

P.S.: please remove such quoted text, it is totally uninteresting in this context (you do not reply to it, either).

Johannes Schindelin· Aug 17, 2009, 16:51 UTC · re: Frank Li · lore

Re: [PATCH 06/11] Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment

Hi,
On Tue, 18 Aug 2009, Frank Li wrote:
> Signed-off-by: Frank Li <lznuaa@gmail.com>
How about this instead?
	Add missing git-compat-util.h to regex.c and fnmatch.c
	This will be needed to compile with Microsoft Visual C++.
Show 12 quoted lines
> diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c
> index 14feac7..5cbd49c 100644
> --- a/compat/fnmatch/fnmatch.c
> +++ b/compat/fnmatch/fnmatch.c
> @@ -16,6 +16,10 @@
>     write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
>     Boston, MA 02111-1307, USA.  */
>  
> +#ifdef _MSC_VER
> +#include "git-compat-util.h"
> +#endif
> +

Why not leave those #ifdef guards? Either they don't hurt, or they will hurt Microsoft Visual C++, too.

Ciao, Dscho

Johannes Sixt· Aug 17, 2009, 19:23 UTC · re: Frank Li · lore

Re: [PATCH 06/11] Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment

On Montag, 17. August 2009, Frank Li wrote:
Show 17 quoted lines
> Signed-off-by: Frank Li <lznuaa@gmail.com>
> ---
>  compat/fnmatch/fnmatch.c |    4 ++++
>  compat/regex/regex.c     |    4 ++++
>  2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c
> index 14feac7..5cbd49c 100644
> --- a/compat/fnmatch/fnmatch.c
> +++ b/compat/fnmatch/fnmatch.c
> @@ -16,6 +16,10 @@
>     write to the Free Software Foundation, Inc., 59 Temple Place - Suite
> 330, Boston, MA 02111-1307, USA.  */
>
> +#ifdef _MSC_VER
> +#include "git-compat-util.h"
> +#endif
There is a *lot* to explain: Why the *heck* is this needed?
Show 11 quoted lines
> diff --git a/compat/regex/regex.c b/compat/regex/regex.c
> index 5728de1..2298a3a 100644
> --- a/compat/regex/regex.c
> +++ b/compat/regex/regex.c
> @@ -20,6 +20,10 @@
>     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
>
>  /* AIX requires this to be the first thing in the file. */
> +#ifdef _MSC_VER
> +#include "git-compat-util.h"
> +#endif
Same here.
-- Hannes

← back to recent threads