-D_REENTRANT



Hi,

I noticed that only glib and atk are compiled with -D_REENTRANT. Pango
and GTK+ lack this compiler flag and thus do the wrong thing in 
threaded environments. This doesn't seem to be a problem with glibc
which redefines some symbols if an application is linked against 
libpthread but it leads to strange errors with libc implementations
that don't have this behaviour.

I'd suggest a change like this one for Pango:

Index: configure.in
===================================================================
RCS file: /cvs/gnome/pango/configure.in,v
retrieving revision 1.105
diff -u -p -r1.105 configure.in
--- configure.in	7 Mar 2002 19:45:48 -0000	1.105
+++ configure.in	14 Mar 2002 14:07:58 -0000
@@ -248,7 +248,9 @@ AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION,
 *** Glib is always available from ftp://ftp.gtk.org/.]),
   gobject gmodule)
 
+GLIB_CFLAGS=`$PKG_CONFIG --cflags gthread-2.0`
 CFLAGS="$CFLAGS $GLIB_CFLAGS"
 
 AC_SUBST(GLIB_LIBS)


I can come up with a similar patch for GTK+ if you agree that this
is the right thing to do.


Salut, Sven



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