From: Frank Li <lznuaa@gmail.com>
To: git@vger.kernel.org, msysgit@googlegroups.com
Cc: Frank Li <lznuaa@gmail.com>
Subject: [PATCH 06/12] Add _MSC_VER in porting head file git-compat-util.h
Date: Wed, 19 Aug 2009 23:52:41 +0800 [thread overview]
Message-ID: <1250697167-5536-6-git-send-email-lznuaa@gmail.com> (raw)
In-Reply-To: <1250697167-5536-5-git-send-email-lznuaa@gmail.com>
Add Microsoft C++ compiler predefine _MSC_VER at
git-compat-util.h to include msvc.h at MSVC environment
Signed-off-by: Frank Li <lznuaa@gmail.com>
---
git-compat-util.h | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
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
next prev parent reply other threads:[~2009-08-19 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 15:52 [PATCH 01/12] Avoid declaration after instruction Frank Li
2009-08-19 15:52 ` [PATCH 02/12] Define SNPRINTF_SIZE_CORR=1 for Microsoft Visual C++ Frank Li
2009-08-19 15:52 ` [PATCH 03/12] Using macro WIN32 replace __MINGW32_ at Windows special handler The code which is conditional on MinGW32 is actually conditional on Windows. Use WIN32 macro will share both MINGW32 and MSVC environment Frank Li
2009-08-19 15:52 ` [PATCH 04/12] mingw.c: Use the O_BINARY flag to open files Frank Li
2009-08-19 15:52 ` [PATCH 05/12] Place __stdcall between return value and function name Frank Li
2009-08-19 15:52 ` Frank Li [this message]
2009-08-19 15:52 ` [PATCH 07/12] Add Unix header files to build git at MSVC Frank Li
2009-08-19 15:52 ` [PATCH 08/12] Add MSVC porting files Frank Li
2009-08-19 15:52 ` [PATCH 09/12] Don't include windows.h at winansi.c at MSVC build Frank Li
2009-08-19 15:52 ` [PATCH 10/12] Fix errcode have defined as int at MSVC Frank Li
2009-08-19 15:52 ` [PATCH 11/12] Add MSVC Project file Frank Li
2009-08-19 15:59 ` [PATCH 08/12] Add MSVC porting files Erik Faye-Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1250697167-5536-6-git-send-email-lznuaa@gmail.com \
--to=lznuaa@gmail.com \
--cc=git@vger.kernel.org \
--cc=msysgit@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).