Re: -D_REENTRANT



Sven Neumann <sven gimp org> writes:

> Hi,
> 
> Sebastian Wilhelmi <wilhelmi ira uka de> writes:
> 
> > > > 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.
> > 
> > This definatly has to happen. I wonder, when that disappeared.
> 
> OK, so here's the patch for configure.in in GTK+. I'm waiting for
> commit approval.

Looks good, except that in, say:

>  GDK_PACKAGES=$PANGO_PACKAGES
>  GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
> -GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
> +GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags $GDK_PIXBUF_PACKAGES $GDK_PACKAGES gthread-2.0` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"

Note that the ordering here is "base => derived", so I'd rather have gthread-2.0 first 
in the list.

>  >  #
>  # If we aren't writing explicit dependencies, then don't put the extra libraries we need
> @@ -1293,7 +1293,7 @@ GTK_PACKAGES=atk
>  GTK_EXTRA_LIBS=
>  GTK_EXTRA_CFLAGS= 
>  GTK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GTK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
> -GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags  $GTK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
> +GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags  $GTK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES gthread-2.0` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
                                           ^^^^

Not a new problem with your patch, but definitely needs fixing.

Regards,
                                        Owen



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