From eba784d24d12ad7243708d97d80427bbdc9fd2b7 Mon Sep 17 00:00:00 2001 From: John Haley Date: Wed, 5 Aug 2015 10:19:06 -0700 Subject: [PATCH] Fix duplicate basenames to support older VS With Visual Studio versions 2008 and older they ignore the full path to files and only check the basename of the file to find a collision. Additionally, having duplicate basenames can break other build tools like GYP. This fixes https://github.com/libgit2/libgit2/issues/3356 --- src/path.c | 2 +- src/util.c | 2 +- src/win32/{buffer.c => w32_buffer.c} | 3 +-- src/win32/{buffer.h => w32_buffer.h} | 0 4 files changed, 3 insertions(+), 4 deletions(-) rename src/win32/{buffer.c => w32_buffer.c} (98%) rename src/win32/{buffer.h => w32_buffer.h} (100%) diff --git a/src/path.c b/src/path.c index 8317aaaa7..9ce5d2978 100644 --- a/src/path.c +++ b/src/path.c @@ -10,7 +10,7 @@ #include "repository.h" #ifdef GIT_WIN32 #include "win32/posix.h" -#include "win32/buffer.h" +#include "win32/w32_buffer.h" #include "win32/w32_util.h" #include "win32/version.h" #else diff --git a/src/util.c b/src/util.c index b08b2b884..b3929bca2 100644 --- a/src/util.c +++ b/src/util.c @@ -11,7 +11,7 @@ #include "posix.h" #ifdef GIT_WIN32 -# include "win32/buffer.h" +# include "win32/w32_buffer.h" #endif #ifdef _MSC_VER diff --git a/src/win32/buffer.c b/src/win32/w32_buffer.c similarity index 98% rename from src/win32/buffer.c rename to src/win32/w32_buffer.c index 74950189e..9122baaa6 100644 --- a/src/win32/buffer.c +++ b/src/win32/w32_buffer.c @@ -6,7 +6,7 @@ */ #include "common.h" -#include "buffer.h" +#include "w32_buffer.h" #include "../buffer.h" #include "utf-conv.h" @@ -52,4 +52,3 @@ int git_buf_put_w(git_buf *buf, const wchar_t *string_w, size_t len_w) buf->ptr[buf->size] = '\0'; return 0; } - diff --git a/src/win32/buffer.h b/src/win32/w32_buffer.h similarity index 100% rename from src/win32/buffer.h rename to src/win32/w32_buffer.h