summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>1998-12-15 17:50:47 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>1998-12-15 17:50:47 +0000
commitd98c425676cbd0eca9580eace93a761d621af108 (patch)
tree64bbc69499652f695b9f1f9db2fd45a2d26fec9f
parent2c30e8620fe66dedf35ee294bcd70051bde8685f (diff)
downloadglib-d98c425676cbd0eca9580eace93a761d621af108.tar.gz
Dont complain, if --without-threads or --with-threads=none is supplied;
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++.
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.pre-2-011
-rw-r--r--ChangeLog.pre-2-1011
-rw-r--r--ChangeLog.pre-2-1211
-rw-r--r--ChangeLog.pre-2-211
-rw-r--r--ChangeLog.pre-2-411
-rw-r--r--ChangeLog.pre-2-611
-rw-r--r--ChangeLog.pre-2-811
-rw-r--r--configure.in9
-rw-r--r--glib.h18
-rw-r--r--glib/glib.h18
-rw-r--r--gmutex.c24
12 files changed, 125 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 87473d804..29cf2ba37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,14 @@
+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:
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 87473d804..29cf2ba37 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,14 @@
+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:
diff --git a/configure.in b/configure.in
index 25363b432..71b671c90 100644
--- a/configure.in
+++ b/configure.in
@@ -564,7 +564,10 @@ if test "x$want_threads" = xyes || test "x$want_threads" = xposix; then
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
@@ -575,7 +578,7 @@ fi
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
@@ -680,6 +683,8 @@ AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c")
AC_SUBST(G_THREAD_CFLAGS)
AC_SUBST(G_THREAD_LIBS)
+CFLAGS="$CFLAGS $G_THREAD_CFLAGS"
+
dnl ******************************
dnl *** output the whole stuff ***
dnl ******************************
diff --git a/glib.h b/glib.h
index d4d1aaa77..5a3020b9e 100644
--- a/glib.h
+++ b/glib.h
@@ -2620,8 +2620,8 @@ struct _GThreadFunctions
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;
@@ -2660,11 +2660,11 @@ GMutex* g_static_mutex_get_mutex_impl(GMutex** mutex);
#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
@@ -2684,8 +2684,8 @@ struct _GStaticPrivate
#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);
diff --git a/glib/glib.h b/glib/glib.h
index d4d1aaa77..5a3020b9e 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -2620,8 +2620,8 @@ struct _GThreadFunctions
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;
@@ -2660,11 +2660,11 @@ GMutex* g_static_mutex_get_mutex_impl(GMutex** mutex);
#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
@@ -2684,8 +2684,8 @@ struct _GStaticPrivate
#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);
diff --git a/gmutex.c b/gmutex.c
index b1d894799..2716f17d7 100644
--- a/gmutex.c
+++ b/gmutex.c
@@ -104,7 +104,7 @@ g_static_mutex_get_mutex_impl (GMutex** mutex)
}
gpointer
-g_static_private_get (GStaticPrivate *private)
+g_static_private_get (GStaticPrivate *private_key)
{
GArray *array;
@@ -112,16 +112,16 @@ g_static_private_get (GStaticPrivate *private)
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)
{
@@ -135,21 +135,21 @@ g_static_private_set (GStaticPrivate *private,
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