summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhboehm <hboehm>2008-02-16 06:07:00 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:42 +0400
commitd6b11ce91f2ef4c7bcacd98326f5b27bed0e25a0 (patch)
treeec457c44161124c74475f3ba519cbdeefe1307a5
parent712ce98a723befd8f8cf5d9bbed8af1a1ea6b166 (diff)
downloadbdwgc-d6b11ce91f2ef4c7bcacd98326f5b27bed0e25a0.tar.gz
2008-02-15 Hans Boehm <Hans.Boehm@hp.com>
* windows-untested/gc.def: Remove CreateThread line. * windows-untested/README: New file. * win32_threads.c (GC_use_DllMain): Force collector initialization. (GC_init_parallel): Reformat comment. * include/gc.h (GC_use_DllMain): Clarify usage rules in comment. * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code. * include/gc_cpp.h: Add matching placement delete overloads everywhere. * include/private/gc_locks.h (NO_THREAD): Add cast. * include/private/gcconfig.h: Add test for __HP_aCC. * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX. * Makefile.in, configure: Regenerate.
-rw-r--r--ChangeLog15
-rw-r--r--Makefile.in12
-rwxr-xr-xconfigure79
-rw-r--r--configure.ac11
-rw-r--r--include/gc.h3
-rw-r--r--include/gc_cpp.h28
-rw-r--r--include/private/gc_locks.h2
-rw-r--r--include/private/gcconfig.h2
-rw-r--r--mark.c4
-rw-r--r--tests/tests.am4
-rw-r--r--win32_threads.c9
-rw-r--r--windows-untested/README4
-rw-r--r--windows-untested/gc.def1
13 files changed, 134 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 61b9beb9..a6e8dee8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-02-15 Hans Boehm <Hans.Boehm@hp.com>
+
+ * windows-untested/gc.def: Remove CreateThread line.
+ * windows-untested/README: New file.
+ * win32_threads.c (GC_use_DllMain): Force collector initialization.
+ (GC_init_parallel): Reformat comment.
+ * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
+ * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
+ * include/gc_cpp.h: Add matching placement delete overloads
+ everywhere.
+ * include/private/gc_locks.h (NO_THREAD): Add cast.
+ * include/private/gcconfig.h: Add test for __HP_aCC.
+ * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX.
+ * Makefile.in, configure: Regenerate.
+
2008-02-11 Hans Boehm <Hans.Boehm@hp.com> (partly David Leonard)
* doc/README.win32: Fix typo.
diff --git a/Makefile.in b/Makefile.in
index e3f67ea9..087ecaa1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -197,8 +197,11 @@ smashtest_DEPENDENCIES = $(am__DEPENDENCIES_2)
am__test_cpp_SOURCES_DIST = tests/test_cpp.cc
@CPLUSPLUS_TRUE@am_test_cpp_OBJECTS = tests/test_cpp.$(OBJEXT)
test_cpp_OBJECTS = $(am_test_cpp_OBJECTS)
-@CPLUSPLUS_TRUE@test_cpp_DEPENDENCIES = libgccpp.la \
-@CPLUSPLUS_TRUE@ $(am__DEPENDENCIES_2)
+@AVOID_CPP_LIB_FALSE@@CPLUSPLUS_TRUE@test_cpp_DEPENDENCIES = \
+@AVOID_CPP_LIB_FALSE@@CPLUSPLUS_TRUE@ libgccpp.la \
+@AVOID_CPP_LIB_FALSE@@CPLUSPLUS_TRUE@ $(am__DEPENDENCIES_2)
+@AVOID_CPP_LIB_TRUE@@CPLUSPLUS_TRUE@test_cpp_DEPENDENCIES = gc_cpp.o \
+@AVOID_CPP_LIB_TRUE@@CPLUSPLUS_TRUE@ $(am__DEPENDENCIES_2)
am__threadleaktest_SOURCES_DIST = tests/thread_leak_test.c
@THREADS_TRUE@am_threadleaktest_OBJECTS = \
@THREADS_TRUE@ tests/thread_leak_test.$(OBJEXT)
@@ -279,6 +282,8 @@ AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
+AVOID_CPP_LIB_FALSE = @AVOID_CPP_LIB_FALSE@
+AVOID_CPP_LIB_TRUE = @AVOID_CPP_LIB_TRUE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
@@ -566,7 +571,8 @@ smashtest_LDADD = $(test_ldadd)
@THREADS_TRUE@threadleaktest_SOURCES = tests/thread_leak_test.c
@THREADS_TRUE@threadleaktest_LDADD = $(test_ldadd)
@CPLUSPLUS_TRUE@test_cpp_SOURCES = tests/test_cpp.cc
-@CPLUSPLUS_TRUE@test_cpp_LDADD = libgccpp.la $(test_ldadd)
+@AVOID_CPP_LIB_FALSE@@CPLUSPLUS_TRUE@test_cpp_LDADD = libgccpp.la $(test_ldadd)
+@AVOID_CPP_LIB_TRUE@@CPLUSPLUS_TRUE@test_cpp_LDADD = gc_cpp.o $(test_ldadd)
# installed documentation
#
diff --git a/configure b/configure
index a3afe8a9..5e5e6f37 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 1.33 .
+# From configure.ac Revision: 1.34 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for gc 7.1alpha3.
#
@@ -882,6 +882,8 @@ WIN32_THREADS_TRUE
WIN32_THREADS_FALSE
COMPILER_XLC_TRUE
COMPILER_XLC_FALSE
+AVOID_CPP_LIB_TRUE
+AVOID_CPP_LIB_FALSE
extra_ldflags_libgc
EXTRA_TEST_LIBS
target_all
@@ -6001,6 +6003,24 @@ fi
;;
esac
+case "$host" in
+ *-*-hpux*)
+ avoid_cpp_lib=yes;;
+ *)
+ avoid_cpp_lib=no;
+ ;;
+esac
+
+
+if test $avoid_cpp_lib = yes; then
+ AVOID_CPP_LIB_TRUE=
+ AVOID_CPP_LIB_FALSE='#'
+else
+ AVOID_CPP_LIB_TRUE='#'
+ AVOID_CPP_LIB_FALSE=
+fi
+
+
# extra LD Flags which are required for targets
case "${host}" in
*-*-darwin*)
@@ -6852,7 +6872,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6855 "configure"' > conftest.$ac_ext
+ echo '#line 6875 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9115,11 +9135,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9118: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9138: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9122: \$? = $ac_status" >&5
+ echo "$as_me:9142: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9383,11 +9403,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9386: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9406: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9390: \$? = $ac_status" >&5
+ echo "$as_me:9410: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9487,11 +9507,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9490: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9510: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9494: \$? = $ac_status" >&5
+ echo "$as_me:9514: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11795,7 +11815,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11798 "configure"
+#line 11818 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11895,7 +11915,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11898 "configure"
+#line 11918 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14235,11 +14255,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14238: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14258: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14242: \$? = $ac_status" >&5
+ echo "$as_me:14262: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14339,11 +14359,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14342: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14362: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14346: \$? = $ac_status" >&5
+ echo "$as_me:14366: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15909,11 +15929,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15912: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15932: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15916: \$? = $ac_status" >&5
+ echo "$as_me:15936: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16013,11 +16033,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16016: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16036: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16020: \$? = $ac_status" >&5
+ echo "$as_me:16040: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18215,11 +18235,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18218: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18238: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18222: \$? = $ac_status" >&5
+ echo "$as_me:18242: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18483,11 +18503,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18486: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18506: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18490: \$? = $ac_status" >&5
+ echo "$as_me:18510: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18587,11 +18607,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18590: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18610: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18594: \$? = $ac_status" >&5
+ echo "$as_me:18614: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -22150,6 +22170,13 @@ echo "$as_me: error: conditional \"COMPILER_XLC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${AVOID_CPP_LIB_TRUE}" && test -z "${AVOID_CPP_LIB_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AVOID_CPP_LIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AVOID_CPP_LIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${CPLUSPLUS_TRUE}" && test -z "${CPLUSPLUS_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"CPLUSPLUS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -22859,6 +22886,8 @@ WIN32_THREADS_TRUE!$WIN32_THREADS_TRUE$ac_delim
WIN32_THREADS_FALSE!$WIN32_THREADS_FALSE$ac_delim
COMPILER_XLC_TRUE!$COMPILER_XLC_TRUE$ac_delim
COMPILER_XLC_FALSE!$COMPILER_XLC_FALSE$ac_delim
+AVOID_CPP_LIB_TRUE!$AVOID_CPP_LIB_TRUE$ac_delim
+AVOID_CPP_LIB_FALSE!$AVOID_CPP_LIB_FALSE$ac_delim
extra_ldflags_libgc!$extra_ldflags_libgc$ac_delim
EXTRA_TEST_LIBS!$EXTRA_TEST_LIBS$ac_delim
target_all!$target_all$ac_delim
@@ -22893,7 +22922,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 47; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index 9618d298..39343cc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ AC_INIT(gc,7.1alpha3,Hans.Boehm@hp.com)
AC_CONFIG_SRCDIR(gcj_mlc.c)
AC_CANONICAL_TARGET
AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.34 $)
+AC_REVISION($Revision: 1.35 $)
GC_SET_VERSION
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects nostdinc])
AM_MAINTAINER_MODE
@@ -300,6 +300,15 @@ case "$host" in
;;
esac
+case "$host" in
+ *-*-hpux*)
+ avoid_cpp_lib=yes;;
+ *)
+ avoid_cpp_lib=no;
+ ;;
+esac
+AM_CONDITIONAL(AVOID_CPP_LIB,test $avoid_cpp_lib = yes)
+
# extra LD Flags which are required for targets
case "${host}" in
*-*-darwin*)
diff --git a/include/gc.h b/include/gc.h
index 529481f2..4d9285bf 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -1073,6 +1073,9 @@ GC_register_has_static_roots_callback
/*
* Use implicit thread registration via DllMain.
+ * Must be called before GC_INIT and other GC routines.
+ * Should be avoided if GC_beginthreadex and friends can be called
+ * instead.
*/
GC_API void GC_use_DllMain(void);
diff --git a/include/gc_cpp.h b/include/gc_cpp.h
index d3df2112..2a69f052 100644
--- a/include/gc_cpp.h
+++ b/include/gc_cpp.h
@@ -177,7 +177,9 @@ class gc {public:
/* Must be redefined here, since the other overloadings */
/* hide the global definition. */
inline void operator delete( void* obj );
-# ifdef GC_PLACEMENT_DELETE
+# ifdef GC_PLACEMENT_DELETE
+ inline void operator delete( void*, GCPlacement );
+ /* called if construction fails. */
inline void operator delete( void*, void* );
# endif
@@ -187,6 +189,7 @@ class gc {public:
inline void* operator new[]( size_t size, void *p );
inline void operator delete[]( void* obj );
# ifdef GC_PLACEMENT_DELETE
+ inline void operator delete[]( void*, GCPlacement );
inline void operator delete[]( void*, void* );
# endif
#endif /* GC_OPERATOR_NEW_ARRAY */
@@ -235,12 +238,15 @@ inline void* operator new(
classes derived from "gc_cleanup" or containing members derived
from "gc_cleanup". */
+# ifdef GC_PLACEMENT_DELETE
+ inline void operator delete( void*, GCPlacement, GCCleanUpFunc, void * );
+# endif
#ifdef _MSC_VER
/** This ensures that the system default operator new[] doesn't get
* undefined, which is what seems to happen on VC++ 6 for some reason
* if we define a multi-argument operator new[].
- * There seems to be really redirect new in this environment without
+ * There seems to be no way to redirect new in this environment without
* including this everywhere.
*/
void *operator new[]( size_t size );
@@ -296,6 +302,10 @@ inline void gc::operator delete( void* obj ) {
#ifdef GC_PLACEMENT_DELETE
inline void gc::operator delete( void*, void* ) {}
+
+ inline void gc::operator delete( void* p, GCPlacement gcp ) {
+ GC_FREE(p);
+ }
#endif
#ifdef GC_OPERATOR_NEW_ARRAY
@@ -314,6 +324,10 @@ inline void gc::operator delete[]( void* obj ) {
#ifdef GC_PLACEMENT_DELETE
inline void gc::operator delete[]( void*, void* ) {}
+
+ inline void gc::operator delete[]( void* p, GCPlacement gcp ) {
+ gc::operator delete(p); }
+
#endif
#endif /* GC_OPERATOR_NEW_ARRAY */
@@ -356,6 +370,16 @@ inline void* operator new(
obj = GC_MALLOC_UNCOLLECTABLE( size );};
return obj;}
+# ifdef GC_PLACEMENT_DELETE
+inline void operator delete (
+ void *p,
+ GCPlacement gcp,
+ GCCleanUpFunc cleanup,
+ void* clientData )
+{
+ GC_FREE(p);
+}
+# endif
#ifdef GC_OPERATOR_NEW_ARRAY
diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h
index 57c7c416..d11044b3 100644
--- a/include/private/gc_locks.h
+++ b/include/private/gc_locks.h
@@ -102,7 +102,7 @@
# undef NUMERIC_THREAD_ID_UNIQUE
# endif
# endif
-# define NO_THREAD (-1l)
+# define NO_THREAD ((unsigned long)(-1l))
/* != NUMERIC_THREAD_ID(pthread_self()) for any thread */
# if !defined(THREAD_LOCAL_ALLOC) && !defined(USE_PTHREAD_LOCKS)
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 3a0f4523..f98f9240 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -203,7 +203,7 @@
# endif
# define mach_type_known
# endif
-# if defined(__ia64) && defined(_HPUX_SOURCE)
+# if defined(__ia64) && (defined(_HPUX_SOURCE) || defined(__HP_aCC))
# define IA64
# ifndef HPUX
# define HPUX
diff --git a/mark.c b/mark.c
index a82b7f06..95011665 100644
--- a/mark.c
+++ b/mark.c
@@ -752,8 +752,8 @@ mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
continue;
}
descr = *(word *)(type_descr
- - (descr - (GC_DS_PER_OBJECT
- - GC_INDIR_PER_OBJ_BIAS)));
+ - (descr + (GC_INDIR_PER_OBJ_BIAS
+ - GC_DS_PER_OBJECT)));
}
if (0 == descr) {
/* Can happen either because we generated a 0 descriptor */
diff --git a/tests/tests.am b/tests/tests.am
index d649d178..28593770 100644
--- a/tests/tests.am
+++ b/tests/tests.am
@@ -57,6 +57,10 @@ if CPLUSPLUS
TESTS += test_cpp$(EXEEXT)
check_PROGRAMS += test_cpp
test_cpp_SOURCES = tests/test_cpp.cc
+if AVOID_CPP_LIB
+test_cpp_LDADD = gc_cpp.o $(test_ldadd)
+else
test_cpp_LDADD = libgccpp.la $(test_ldadd)
endif
+endif
diff --git a/win32_threads.c b/win32_threads.c
index 3d9806ea..d5ca89f0 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -147,6 +147,7 @@ void GC_init_parallel(void);
# endif
GC_ASSERT(!parallel_initialized);
GC_win32_dll_threads = TRUE;
+ GC_init_parallel();
}
#else
GC_API void GC_use_DllMain(void)
@@ -1497,10 +1498,10 @@ void GC_init_parallel(void)
if (!GC_is_initialized) GC_init();
if (GC_win32_dll_threads) {
GC_need_to_lock = TRUE;
- /* Cannot intercept thread creation. Hence we don't know if other */
- /* threads exist. However, client is not allowed to create other */
- /* threads before collector initialization. Thus it's OK not to */
- /* lock before this. */
+ /* Cannot intercept thread creation. Hence we don't know if */
+ /* other threads exist. However, client is not allowed to */
+ /* create other threads before collector initialization. */
+ /* Thus it's OK not to lock before this. */
}
/* Initialize thread local free lists if used. */
# if defined(THREAD_LOCAL_ALLOC)
diff --git a/windows-untested/README b/windows-untested/README
new file mode 100644
index 00000000..0de3ce74
--- /dev/null
+++ b/windows-untested/README
@@ -0,0 +1,4 @@
+gc.def should probably be removed completely.
+
+I removed an apparently erroneous line for GC_CreateThread. Unfortunately
+gc.def is referenced in various other places I cannot easily edit. -HB
diff --git a/windows-untested/gc.def b/windows-untested/gc.def
index 73f7381f..2853518f 100644
--- a/windows-untested/gc.def
+++ b/windows-untested/gc.def
@@ -1,3 +1,2 @@
EXPORTS
GC_version DATA
- GC_CreateThread=KERNEL32.CreateThread