Re: Clarification on Glib Thread-Safe Operation




Owen Taylor wrote:

On Thu, 2003-10-02 at 15:33, David Judkovics wrote:

Thats the corollary to my question, I think. I have the default configuration for glib and 'G_THREADS_ENABLED' is not defined. If 'G_THREADS_ENABLED' is not defined does that mean '--disable-threads' was passed to configure?

How are you deciding that G_THREADS_ENABLED is not defined? Does a test case like:

===
#include <glib.h>

#ifndef G_THREADS_ENABLED
#error "Threads were not enabled
#endif

int main ()
{
 return 0;
}
===

not compile succesfully?
					Owen




For glib-1.2 I was assuming it should be found in glib.h and in glib-2.0 I was looking for it in gmacros.h.

To compile your example I had to add the path to 'glibconfig.h' found in '/usr/lib/glib/include/'. In 'glibconfig.h' 'G_THREADS_ENABLED' is defined. So, yes it is defined. My mistake. I just didn't search there. Not sure why I thought it was in glib.h.

Thanks Much













[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]