diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-01-28 16:10:13 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-01-28 16:10:14 -0800 |
| commit | 116a866bf50da9b893623ebb940e1c6bff7a29bc (patch) | |
| tree | 34101d20455fa65c52c406c92f6b6a2007585135 /compat/win32/pthread.h | |
| parent | 4f3aa9da7022c11c5db51b5b9063c0215863aba1 (diff) | |
| parent | 2921600afbcdd5f245475602cabba2fbaa5ff93f (diff) | |
| download | git-116a866bf50da9b893623ebb940e1c6bff7a29bc.tar.gz | |
Merge branch 'js/msys2'
Beginning of the upstreaming process of Git for Windows effort.
* js/msys2:
mingw: uglify (a, 0) definitions to shut up warnings
mingw: squash another warning about a cast
mingw: avoid warnings when casting HANDLEs to int
mingw: avoid redefining S_* constants
compat/winansi: support compiling with MSys2
compat/mingw: support MSys2-based MinGW build
nedmalloc: allow compiling with MSys2's compiler
config.mak.uname: supporting 64-bit MSys2
config.mak.uname: support MSys2
Diffstat (limited to 'compat/win32/pthread.h')
| -rw-r--r-- | compat/win32/pthread.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h index 8ad187344f..20b35a283c 100644 --- a/compat/win32/pthread.h +++ b/compat/win32/pthread.h @@ -18,7 +18,10 @@ */ #define pthread_mutex_t CRITICAL_SECTION -#define pthread_mutex_init(a,b) (InitializeCriticalSection((a)), 0) +static inline int return_0(int i) { + return 0; +} +#define pthread_mutex_init(a,b) return_0((InitializeCriticalSection((a)), 0)) #define pthread_mutex_destroy(a) DeleteCriticalSection((a)) #define pthread_mutex_lock EnterCriticalSection #define pthread_mutex_unlock LeaveCriticalSection @@ -77,7 +80,7 @@ extern pthread_t pthread_self(void); static inline int pthread_exit(void *ret) { - ExitThread((DWORD)ret); + ExitThread((DWORD)(intptr_t)ret); } typedef DWORD pthread_key_t; |
