MSVC: Windows-native implementation for subset of Pthreads API

This patch implements native to Windows subset of pthreads API used by Git.
It allows to remove Pthreads for Win32 dependency for MSVC, msysgit and
Cygwin.

[J6t: If the MinGW build was built as part of the msysgit build
environment, then threading was already enabled because the
pthreads-win32 package is available in msysgit. With this patch, we can now
enable threaded code unconditionally.]

Signed-off-by: Andrzej K. Haczewski <ahaczewski@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Andrzej K. Haczewski
2010-01-15 21:12:20 +01:00
committed by Junio C Hamano
parent b6f714f89a
commit 44626dc7d5
6 changed files with 217 additions and 11 deletions

View File

@ -3,7 +3,7 @@
#include <conio.h>
#include "../strbuf.h"
static int err_win_to_posix(DWORD winerr)
int err_win_to_posix(DWORD winerr)
{
int error = ENOSYS;
switch(winerr) {