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
This commit is contained in:
John Haley 2015-08-05 10:19:06 -07:00
parent cf716beed2
commit eba784d24d
4 changed files with 3 additions and 4 deletions

View File

@ -10,7 +10,7 @@
#include "repository.h" #include "repository.h"
#ifdef GIT_WIN32 #ifdef GIT_WIN32
#include "win32/posix.h" #include "win32/posix.h"
#include "win32/buffer.h" #include "win32/w32_buffer.h"
#include "win32/w32_util.h" #include "win32/w32_util.h"
#include "win32/version.h" #include "win32/version.h"
#else #else

View File

@ -11,7 +11,7 @@
#include "posix.h" #include "posix.h"
#ifdef GIT_WIN32 #ifdef GIT_WIN32
# include "win32/buffer.h" # include "win32/w32_buffer.h"
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER

View File

@ -6,7 +6,7 @@
*/ */
#include "common.h" #include "common.h"
#include "buffer.h" #include "w32_buffer.h"
#include "../buffer.h" #include "../buffer.h"
#include "utf-conv.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'; buf->ptr[buf->size] = '\0';
return 0; return 0;
} }