Re: [PATCH] MSVC: Windows-native implementation for subset of Pthreads API
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Nov 5, 2009, 17:31 UTC
- Message-ID
- <4AF30BFD.4070101@viscovery.net>
- In-Reply-To
- <1257439548-9258-1-git-send-email-ahaczewski@gmail.com>
Thanks.
I pushed this to
git://repo.or.cz/git/mingw/j6t.git pthreads-for-windows
together with Nico's patch and another patch to enable pthreads on MinGW unconditionally. Feedback welcome!
Andrzej K. Haczewski (1):
MSVC: Windows-native implementation for subset of Pthreads APIJohannes Sixt (1):
MinGW: enable pthreadsNicolas Pitre (1):
pack-objects: move thread autodetection closer to relevant codeThis is my patch:
--- >8 --- From: Johannes Sixt <j6t@kdbg.org> Subject: [PATCH] MinGW: enable pthreads
If the MinGW build was built as part of the msysgit build environment, then threading was already enabled because the pthreads package from GNU-Win32 is available in msysgit.
The previous patch added a minimal pthreads implementation for Windows. Therefore, we can now enable code that uses pthreads unconditionally.
Signed-off-by: Johannes Sixt <j6t@kdbg.org> --- Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile index db7ffb0..4b8603a 100644 --- a/Makefile +++ b/Makefile @@ -986,9 +986,11 @@ ifneq (,$(findstring MINGW,$(uname_S))) UNRELIABLE_FSTAT = UnfortunatelyYes OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo NO_REGEX = YesPlease + THREADED_DELTA_SEARCH = YesPlease COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" - COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o + COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \ + compat/win32/pthread.o EXTLIBS += -lws2_32 X = .exe ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) @@ -998,10 +1000,8 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) EXTLIBS += /mingw/lib/libz.a NO_R_TO_GCC_LINKER = YesPlease INTERNAL_QSORT = YesPlease - THREADED_DELTA_SEARCH = YesPlease else NO_CURL = YesPlease - NO_PTHREADS = YesPlease endif endif endif
-- 1.6.5.2.1198.ge698c