Ethereal-dev: Re: [Ethereal-dev] USE_THREADS on Win32

Note: This archive is from the project's previous web site, This list is no longer active.

From: "Gisle Vanem" <[email protected]>
Date: Tue, 6 Jul 2004 16:52:03 +0200
"Ulf Lamping" <[email protected]> said:

> Well, I've tried defining USE_THREADS in config.h.win32.
> This required to add gthread to the libs, so added to the config.nmake 
> the gthread like:
> GLIB_LIBS=$(GLIB_DIR)\lib\glib-$(GLIB_VERSION).lib \
>     $(GLIB_DIR)\lib\gmodule-$(GLIB_VERSION).lib \
>     $(GLIB_DIR)\lib\gobject-$(GLIB_VERSION).lib \
>     $(GLIB_DIR)\lib\gthread-$(GLIB_VERSION).lib
> After that, starting Ethereal required g_convert_init from 
> libglib-2.0-0.dll, which isn't defined anywhere.

That's odd. Only g_convert_init() I see is a *prototype* in
gthread-impl.c which is never called by anyone.

BTW. my previous patch to gtk/main.c was wrong. Have to
do something like this:

#if defined(USE_THREADS)
  #if !defined(G_THREADS_ENABLED)
    #warning You cannot set USE_THREADS (G_THREADS_ENABLED not defined)
  #elif defined(WIN32) && !GLIB_CHECK_VERSION(2,4,0)
    /* Win32 requires GLib 2.4.x for UI update */
    #warning You cannot set USE_THREADS
  #elif (GTK_MAJOR_VERSION < 2)
    /* Others requires GLib 2.x for UI update */
    #warning You cannot set USE_THREADS

Not sure the GLIB_CHECK_VERSION() is defined for old versions.

But, I was fooled the first time I tried USE_THREADS. It wasn't
really enabled. Trying now, ethereal.exe doesn't work at all. Links 
okay, but the UI hangs indefinitely.