From 49041e78f24f9d455d977bb6eb8fc9d9561569c8 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 18 May 2011 16:01:01 +0200 Subject: [PATCH 1/4] Fix mixed line endings in .gitignore --- .gitignore | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ddff317f6..cde2aa687 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - /apidocs /trash-*.exe /libgit2.pc @@ -13,10 +12,10 @@ .waf* build/ tests/tmp/ -msvc/Debug/ -msvc/Release/ -*.suo -*.user -*.sdf +msvc/Debug/ +msvc/Release/ +*.suo +*.user +*.sdf *.opensdf .DS_Store From 875a5c2df7da1ba473ef0cd7d5bfb78e4e5fd657 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 18 May 2011 16:07:22 +0200 Subject: [PATCH 2/4] Ignore CMake files and generated Visual Studio files --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cde2aa687..254e63db7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,11 @@ build/ tests/tmp/ msvc/Debug/ msvc/Release/ +*.sln *.suo -*.user +*.vc*proj* *.sdf *.opensdf +CMake* +*.cmake .DS_Store From 072347166f78408dd4a92cb3b75f6673b71a0f7e Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 18 May 2011 16:46:56 +0200 Subject: [PATCH 3/4] Define str(n)casecmp for MSVC MSVC has _str(n)icmp instead. --- src/msvc-compat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msvc-compat.h b/src/msvc-compat.h index d4c031d2d..7422a7aea 100644 --- a/src/msvc-compat.h +++ b/src/msvc-compat.h @@ -17,6 +17,10 @@ # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) # define S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO) +/* case-insensitive string comparision */ +# define strcasecmp _stricmp +# define strncasecmp _strnicmp + #if (_MSC_VER >= 1600) # include #else From 765fdf4a0e9ca6a0f577cad60f69e15e77bfa601 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 18 May 2011 17:19:38 +0200 Subject: [PATCH 4/4] Use "__inline" instead of "inline" with MSVC MSVC supports "inline" only in C++ code, not in C code. --- src/config_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config_file.c b/src/config_file.c index 37bb2794e..fcd15c6d4 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -565,7 +565,7 @@ void cfg_consume_line(file_backend *cfg) cfg->reader.read_ptr = line_end; } -static inline int config_keychar(int c) +GIT_INLINE(int) config_keychar(int c) { return isalnum(c) || c == '-'; }