From: hboehm Date: Sun, 1 Mar 2009 01:52:59 +0000 (+0000) Subject: 2009-02-28 Hans Boehm X-Git-Tag: gc7_2alpha2~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68d2cdac0c33d700333fea4379d7cb211ccfd586;p=gc 2009-02-28 Hans Boehm * misc.c (GC_set_warn_proc): Implicitly intialize GC on non-Cygwin win32. --- diff --git a/ChangeLog b/ChangeLog index 2035b33f..742c1dc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-28 Hans Boehm + * misc.c (GC_set_warn_proc): Implicitly intialize GC on + non-Cygwin win32. + 2009-02-28 Hans Boehm (Really Petr Krajca) * configure.ac: Enable thread-local allocation for sparc-linux. * configure: Regenerate. diff --git a/misc.c b/misc.c index df9dc20b..1db1415b 100644 --- a/misc.c +++ b/misc.c @@ -1032,7 +1032,12 @@ GC_API GC_warn_proc GC_CALL GC_set_warn_proc(GC_warn_proc p) GC_warn_proc result; # ifdef GC_WIN32_THREADS - GC_ASSERT(GC_is_initialized); +# ifdef CYGWIN32 + /* Need explicit GC_INIT call */ + GC_ASSERT(GC_is_initialized); +# else + if (!GC_is_initialized) GC_init(); +# endif # endif LOCK(); result = GC_current_warn_proc;