+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
+1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Dont complain, if --without-threads or
+ --with-threads=none is supplied; Test for pthread_attr_init
+ instead of pthread_cond_init, if threads seems to be supported by
+ standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
+ as well.
+
+ * glib.h, gmutex.c: Changed private to private_key to avoid
+ problems when compiling with under C++.
+
1998-12-15 Jeff Garzik <jgarzik@Pobox.com>
* configure.in:
AC_CHECK_LIB(pthreads, pthread_cond_init, have_threads=posix)
fi
if test "x$have_threads" = xnone; then
- AC_CHECK_FUNC(pthread_cond_init, have_threads=posix)
+ # dont let us be fooled by a defined pthread_cond_init
+ # function in the standard c-lib, that doesn't have too mean,
+ # there is full thread support, it might be a weak symbol.
+ AC_CHECK_FUNC(pthread_attr_init, have_threads=posix)
fi
fi
if test "x$want_threads" = xyes || test "x$want_threads" = xnspr; then
AC_MSG_CHECKING(for thread implementation)
-if test "x$have_threads" = xnone; then
+if test "x$have_threads" = xnone && test "x$want_threads" != xno; then
AC_MSG_RESULT(none available)
AC_MSG_WARN($THREAD_NO_IMPLEMENTATION)
else
AC_SUBST(G_THREAD_CFLAGS)
AC_SUBST(G_THREAD_LIBS)
+CFLAGS="$CFLAGS $G_THREAD_CFLAGS"
+
dnl ******************************
dnl *** output the whole stuff ***
dnl ******************************
GTimeVal *end_time);
void (*cond_free) (GCond* cond);
GPrivate* (*private_new) (GDestroyNotify destructor);
- gpointer (*private_get) (GPrivate* private);
- void (*private_set) (GPrivate* private, gpointer value);
+ gpointer (*private_get) (GPrivate* private_key);
+ void (*private_set) (GPrivate* private_key, gpointer value);
};
GUTILS_C_VAR GThreadFunctions g_thread_functions_for_glib_use;
#define g_private_new(destructor) \
G_USE_THREAD_FUNC_UNCOND(private_new,(destructor))
-#define g_private_get(private) \
- G_USE_THREAD_FUNC(private_get,((gpointer)private),(private))
-#define g_private_set(private,value) \
- G_USE_THREAD_FUNC(private_set,(void)(private=(GPrivate *)(value)), \
- (private,value))
+#define g_private_get(private_key) \
+ G_USE_THREAD_FUNC(private_get,((gpointer)private_key),(private_key))
+#define g_private_set(private_key,value) \
+ G_USE_THREAD_FUNC(private_set,(void)(private_key=(GPrivate *)(value)), \
+ (private_key,value))
/* GStaticMutex'es can be statically initialized with the value
* G_STATIC_MUTEX_INIT, and then they can directly be used, that is
#define G_STATIC_PRIVATE_INIT { 0 }
-gpointer g_static_private_get (GStaticPrivate* private);
-void g_static_private_set (GStaticPrivate *private,
+gpointer g_static_private_get (GStaticPrivate* private_key);
+void g_static_private_set (GStaticPrivate *private_key,
gpointer data,
GDestroyNotify notify);
GTimeVal *end_time);
void (*cond_free) (GCond* cond);
GPrivate* (*private_new) (GDestroyNotify destructor);
- gpointer (*private_get) (GPrivate* private);
- void (*private_set) (GPrivate* private, gpointer value);
+ gpointer (*private_get) (GPrivate* private_key);
+ void (*private_set) (GPrivate* private_key, gpointer value);
};
GUTILS_C_VAR GThreadFunctions g_thread_functions_for_glib_use;
#define g_private_new(destructor) \
G_USE_THREAD_FUNC_UNCOND(private_new,(destructor))
-#define g_private_get(private) \
- G_USE_THREAD_FUNC(private_get,((gpointer)private),(private))
-#define g_private_set(private,value) \
- G_USE_THREAD_FUNC(private_set,(void)(private=(GPrivate *)(value)), \
- (private,value))
+#define g_private_get(private_key) \
+ G_USE_THREAD_FUNC(private_get,((gpointer)private_key),(private_key))
+#define g_private_set(private_key,value) \
+ G_USE_THREAD_FUNC(private_set,(void)(private_key=(GPrivate *)(value)), \
+ (private_key,value))
/* GStaticMutex'es can be statically initialized with the value
* G_STATIC_MUTEX_INIT, and then they can directly be used, that is
#define G_STATIC_PRIVATE_INIT { 0 }
-gpointer g_static_private_get (GStaticPrivate* private);
-void g_static_private_set (GStaticPrivate *private,
+gpointer g_static_private_get (GStaticPrivate* private_key);
+void g_static_private_set (GStaticPrivate *private_key,
gpointer data,
GDestroyNotify notify);
}
gpointer
-g_static_private_get (GStaticPrivate *private)
+g_static_private_get (GStaticPrivate *private_key)
{
GArray *array;
if (!array)
return NULL;
- if (!private->index)
+ if (!private_key->index)
return NULL;
- else if (private->index <= array->len)
- return g_array_index (array, GStaticPrivateNode, (private->index - 1)).data;
+ else if (private_key->index <= array->len)
+ return g_array_index (array, GStaticPrivateNode, (private_key->index - 1)).data;
else
return NULL;
}
void
-g_static_private_set (GStaticPrivate *private,
+g_static_private_set (GStaticPrivate *private_key,
gpointer data,
GDestroyNotify notify)
{
g_private_set (g_thread_specific_private, array);
}
- if (!private->index)
+ if (!private_key->index)
{
g_mutex_lock (g_thread_specific_mutex);
- if (!private->index)
- private->index = ++next_index;
+ if (!private_key->index)
+ private_key->index = ++next_index;
g_mutex_unlock (g_thread_specific_mutex);
}
- if (private->index > array->len)
- g_array_set_size (array, private->index);
+ if (private_key->index > array->len)
+ g_array_set_size (array, private_key->index);
- g_array_index (array, GStaticPrivateNode, (private->index - 1)).data = data;
- g_array_index (array, GStaticPrivateNode, (private->index - 1)).destroy = notify;
+ g_array_index (array, GStaticPrivateNode, (private_key->index - 1)).data = data;
+ g_array_index (array, GStaticPrivateNode, (private_key->index - 1)).destroy = notify;
}
static void