* configure.ac (GC_THREADS): Refine the comment.
* configure.ac (GC_WIN32_PTHREADS): Add template.
* configure.ac (cygwin, win32): Define GC_WIN32_THREADS instead of
GC_THREADS.
* configure.ac (pthreads): Add mingw target (GC_WIN32_PTHREADS).
* configure: Regenerate.
* include/private/config.h.in: Ditto.
* include/private/gc_locks.h (GC_WIN32_PTHREADS): Remove nested
test for the macro; add comment.
+2011-07-04 Ivan Maidanski <ivmai@mail.ru> (mostly really Andy Wingo)
+
+ * configure.ac (GC_THREADS): Refine the comment.
+ * configure.ac (GC_WIN32_PTHREADS): Add template.
+ * configure.ac (cygwin, win32): Define GC_WIN32_THREADS instead of
+ GC_THREADS.
+ * configure.ac (pthreads): Add mingw target (GC_WIN32_PTHREADS).
+ * configure: Regenerate.
+ * include/private/config.h.in: Ditto.
+ * include/private/gc_locks.h (GC_WIN32_PTHREADS): Remove nested
+ test for the macro; add comment.
+
2011-07-01 Ivan Maidanski <ivmai@mail.ru>
* win32_threads.c (CHECK_LOOKUP_MY_THREAD): New macro definition.
#! /bin/sh
-# From configure.ac Revision: 1.67 .
+# From configure.ac Revision: 1.68 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for gc 7.2alpha7.
#
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
fi
case "$host" in
- x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*)
+ x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* \
+ | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*)
$as_echo "#define GC_LINUX_THREADS 1" >>confdefs.h
$as_echo "#define _REENTRANT 1" >>confdefs.h
;;
*-*-cygwin*)
- $as_echo "#define GC_THREADS 1" >>confdefs.h
+ $as_echo "#define GC_WIN32_THREADS 1" >>confdefs.h
if test "${enable_parallel_mark}" = yes; then
$as_echo "#define PARALLEL_MARK 1" >>confdefs.h
THREADDLLIBS=""
win32_threads=true
;;
+ *-*-mingw*)
+ $as_echo "#define GC_WIN32_PTHREADS 1" >>confdefs.h
+
+ # Using win32-pthreads
+ if test "${enable_parallel_mark}" = yes; then
+ $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
+
+ fi
+ $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
+
+ THREADDLLIBS="-lpthread"
+ ;;
*-*-darwin*)
$as_echo "#define GC_DARWIN_THREADS 1" >>confdefs.h
esac
;;
win32)
- $as_echo "#define GC_THREADS 1" >>confdefs.h
+ $as_echo "#define GC_WIN32_THREADS 1" >>confdefs.h
if test "${enable_parallel_mark}" = yes; then
$as_echo "#define PARALLEL_MARK 1" >>confdefs.h
THREADS=dgux386
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $THREADDLLIBS" >&5
$as_echo "$THREADDLLIBS" >&6; }
- # Use pthread GCC switch
+ # Use pthread GCC switch
THREADDLLIBS=-pthread
if test "${enable_parallel_mark}" = yes; then
$as_echo "#define PARALLEL_MARK 1" >>confdefs.h
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
AC_PREREQ(2.64)
-AC_REVISION($Revision: 1.68 $)
+AC_REVISION($Revision: 1.69 $)
GC_SET_VERSION
AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
AM_CONFIG_HEADER([include/private/config.h])
[Define to use of compiler-support for thread-local variables.])
dnl Thread selection macros.
-AH_TEMPLATE([GC_THREADS], [Define to support threads.])
+AH_TEMPLATE([GC_THREADS], [Define to support platform-specific \
+ threads.])
AH_TEMPLATE([GC_AIX_THREADS], [Define to support IBM AIX threads.])
AH_TEMPLATE([GC_DARWIN_THREADS], [Define to support Darwin pthreads.])
AH_TEMPLATE([GC_FREEBSD_THREADS], [Define to support FreeBSD pthreads.])
AH_TEMPLATE([GC_OPENBSD_THREADS], [Define to support OpenBSD pthreads.])
AH_TEMPLATE([GC_OSF1_THREADS], [Define to support Tru64 pthreads.])
AH_TEMPLATE([GC_SOLARIS_THREADS], [Define to support Solaris pthreads.])
-AH_TEMPLATE([GC_WIN32_THREADS], [Define to support win32 threads.])
+AH_TEMPLATE([GC_WIN32_THREADS], [Define to support Win32 threads.])
+AH_TEMPLATE([GC_WIN32_PTHREADS], [Define to support win32-pthreads.])
dnl System header feature requests.
AH_TEMPLATE([_POSIX_C_SOURCE], [The POSIX feature macro.])
THREADS=posix
AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
case "$host" in
- x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*)
+ x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* \
+ | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*)
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(GC_IRIX_THREADS)
;;
*-*-cygwin*)
- AC_DEFINE(GC_THREADS)
+ AC_DEFINE(GC_WIN32_THREADS)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
fi
THREADDLLIBS=""
win32_threads=true
;;
+ *-*-mingw*)
+ AC_DEFINE(GC_WIN32_PTHREADS)
+ # Using win32-pthreads
+ if test "${enable_parallel_mark}" = yes; then
+ AC_DEFINE(PARALLEL_MARK)
+ fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
+ THREADDLLIBS="-lpthread"
+ ;;
*-*-darwin*)
AC_DEFINE(GC_DARWIN_THREADS)
AC_DEFINE(THREAD_LOCAL_ALLOC)
esac
;;
win32)
- AC_DEFINE(GC_THREADS)
+ AC_DEFINE(GC_WIN32_THREADS)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
AC_DEFINE(THREAD_LOCAL_ALLOC)
dgux386)
THREADS=dgux386
AC_MSG_RESULT($THREADDLLIBS)
- # Use pthread GCC switch
+ # Use pthread GCC switch
THREADDLLIBS=-pthread
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
/* Define to support Solaris pthreads. */
#undef GC_SOLARIS_THREADS
-/* Define to support threads. */
+/* Define to support platform-specific threads. */
#undef GC_THREADS
/* See doc/README.macros. */
/* The minor version number of this GC release. */
#undef GC_VERSION_MINOR
-/* Define to support win32 threads. */
+/* Define to support win32-pthreads. */
+#undef GC_WIN32_PTHREADS
+
+/* Define to support Win32 threads. */
#undef GC_WIN32_THREADS
/* Define to 1 if you have the <dlfcn.h> header file. */
# define THREAD_EQUAL(id1, id2) ((id1) == (id2))
# define NUMERIC_THREAD_ID_UNIQUE
# else
-# if defined(GC_WIN32_PTHREADS)
-# define NUMERIC_THREAD_ID(id) ((unsigned long)(id.p))
- /* Using documented internal details of win32_pthread library. */
- /* Faster than pthread_equal(). Should not change with */
- /* future versions of win32_pthread library. */
-# define THREAD_EQUAL(id1, id2) ((id1.p == id2.p) && (id1.x == id2.x))
-# undef NUMERIC_THREAD_ID_UNIQUE
-# else
- /* Generic definitions that always work, but will result in */
- /* poor performance and weak assertion checking. */
-# define NUMERIC_THREAD_ID(id) 1l
-# define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
-# undef NUMERIC_THREAD_ID_UNIQUE
-# endif
+# define NUMERIC_THREAD_ID(id) ((unsigned long)(id.p))
+ /* Using documented internal details of win32-pthread library. */
+ /* Faster than pthread_equal(). Should not change with */
+ /* future versions of win32-pthread library. */
+# define THREAD_EQUAL(id1, id2) ((id1.p == id2.p) && (id1.x == id2.x))
+# undef NUMERIC_THREAD_ID_UNIQUE
+ /* Generic definitions based on pthread_equal() always work but */
+ /* will result in poor performance (as NUMERIC_THREAD_ID is */
+ /* defined to just a constant) and weak assertion checking. */
# endif
# define NO_THREAD ((unsigned long)(-1l))
/* != NUMERIC_THREAD_ID(pthread_self()) for any thread */