Re: [Gc]: Problems with GC settings
ivmai at mail.ru
Mon Oct 5 10:16:48 PDT 2009
Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> wrote:
> 2009/10/5 Ivan Maidanski <ivmai at mail.ru>:
> > GC_DARWIN_THREADS is defined in gc_config_macros.h.
> > Is the condition not including your case? (Could anybody suggest a better one?)
> I have not seen those definitions take effect. I suspect that is
> because they are incompatible with GC_PTHREADS -- that I needed to
> define for older versions of the garbage collector.
Yes, I see the problem - I'll fix it in a moment.
> > The settings are saved in config.h but only at GC build.
> > You case save any settings you need in you project's config.h.
> As I said in a different email, this is not the right way to go. You
> can not save the settings in a file, config.h, which is not installed,
> because we developers are not always in control of the garbage
> collector settings, specially when we have to used a library built by
> Take for instance someone that builds ECL in a Linux box running
> Debian, or FreeBSD, or OpenBSD, all of them targets which may have
> the garbage collector pre-installed. We need means to know whether the
> garbage collector was installed with support for threads, and we need
> that the garbage collector provides the wrappers for pthread_create
> and other functions in platforms in which this is expected to be
I don't understand. If your project is multi-threaded then GC_THREADS is required to be defined before include "gc.h" (regardless of options GC is built with); if you would try to link your multi-threaded program to a single-threaded GC lib, I'll get a linkage error - this is the intended behavior (IMHO).
More information about the Gc