From 1017f81f0049f493508c1409418af725e8d6998f Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Sun, 27 Apr 2014 13:44:06 +0200 Subject: [PATCH 1/3] Undef lseek first --- src/win32/mingw-compat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win32/mingw-compat.h b/src/win32/mingw-compat.h index 8f51d6f5a..059e39cbc 100644 --- a/src/win32/mingw-compat.h +++ b/src/win32/mingw-compat.h @@ -10,6 +10,7 @@ #if defined(__MINGW32__) /* use a 64-bit file offset type */ +# undef lseek # define lseek _lseeki64 # undef stat # define stat _stati64 From 6e94a1efbca605957d6fc56ae068f30ef57c3c01 Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Sun, 27 Apr 2014 14:25:49 +0200 Subject: [PATCH 2/3] _InterlockedExchange expects a volatile LONG --- src/global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global.c b/src/global.c index 15baf1eb8..2ed5b4c6d 100644 --- a/src/global.c +++ b/src/global.c @@ -74,7 +74,7 @@ static void git__shutdown(void) #if defined(GIT_THREADS) && defined(GIT_WIN32) static DWORD _tls_index; -static DWORD _mutex = 0; +static volatile LONG _mutex = 0; static int synchronized_threads_init() { From f5dd2a289106c74647d35560eee55a48ff0f123f Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Sun, 27 Apr 2014 15:00:00 +0200 Subject: [PATCH 3/3] git_pool_mallocsz takes an unsigned long --- src/attrcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attrcache.c b/src/attrcache.c index f1bc70467..ec22eab25 100644 --- a/src/attrcache.c +++ b/src/attrcache.c @@ -53,7 +53,7 @@ int git_attr_cache__alloc_file_entry( cachesize++; } - ce = git_pool_mallocz(pool, cachesize); + ce = git_pool_mallocz(pool, (uint32_t)cachesize); GITERR_CHECK_ALLOC(ce); if (baselen) {