mirror of
https://github.com/encounter/bdwgc.git
synced 2026-03-30 10:57:55 -07:00
94b85eea2e
Winpthreads is a different pthread implementation for MinGW-w64. This patch redefines GC_WIN32_PTHREADS to mean either pthreads-win32 or winpthreads. * configure.ac (GC_WIN32_PTHREADS): Improve description to cover "winpthreads" library. * doc/README.macros (GC_WIN32_PTHREADS): Likewise. * doc/README.win32: Likewise. * include/gc_config_macros.h (GC_WIN32_THREADS): Mention "winpthreads" library in comment. * win32_threads.c (GC_pthread_join): Likewise. * include/private/gc_locks.h (NUMERIC_THREAD_ID, THREAD_EQUAL, NUMERIC_THREAD_ID_UNIQUE): Define to support winpthreads properly (if GC_WIN32_PTHREADS). * win32_threads.c (GC_PTHREAD_PTRVAL): Likewise.
64-bit Windows on AMD64/Intel EM64T is somewhat supported in the 7.0 and later release. A collector can be built with Microsoft Visual C++ 2005 or with mingw-w64 gcc. More testing would clearly be helpful. NT_X64_STATIC_THREADS_MAKEFILE has been used in this environment. Copy this file to MAKEFILE, and then type "nmake" in a Visual C++ command line window to build the static library and the usual test programs. To verify that the collector is at least somewhat functional, run gctest.exe. This should create gctest.gc.log after a few seconds. This process is completely analogous to NT_STATIC_THREADS_MAKEFILE for the 32-bit version. A similar procedure using NT_X64_THREADS_MAKEFILE should be usable to build the dynamic library. Test_cpp.exe did not seem to run correctly this way. It seems that we're getting the wrong instances of operator new/delete in some cases. The C tests seemed OK. Note that currently a few warnings are still generated by default, and a number of others have been explicitly turned off in the makefile. VC++ note: to suppress warnings use -D_CRT_SECURE_NO_DEPRECATE. gcc note: -fno-strict-aliasing should be used if optimizing.