[libgda] Corrected bugs introduced in commit #3c93177e67dc47b3bc9ec0139cbe3ce7697d67d3



commit daece8d71bd4428d1b76d4fe8585251951018f84
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Dec 29 18:44:54 2011 +0100

    Corrected bugs introduced in commit #3c93177e67dc47b3bc9ec0139cbe3ce7697d67d3

 libgda/thread-wrapper/gda-thread-wrapper.c |    8 ++++++++
 tools/browser/browser-page.c               |    2 +-
 tools/browser/browser-perspective.c        |    2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/libgda/thread-wrapper/gda-thread-wrapper.c b/libgda/thread-wrapper/gda-thread-wrapper.c
index 2a291a4..2d196a5 100644
--- a/libgda/thread-wrapper/gda-thread-wrapper.c
+++ b/libgda/thread-wrapper/gda-thread-wrapper.c
@@ -40,7 +40,11 @@
  * by the worker thread. It is used to avoid creating signal data for threads for which
  * no job is being performed 
  */
+#if GLIB_CHECK_VERSION(2,31,7)
 GPrivate worker_thread_current_queue;
+#else
+GStaticPrivate worker_thread_current_queue = G_STATIC_PRIVATE_INIT;
+#endif
 
 typedef struct _ThreadData ThreadData;
 typedef struct _Job Job;
@@ -113,7 +117,11 @@ pipe_unref (Pipe *p)
 #endif
 		if (p->ref_count == 0) {
 			/* destroy @p */
+#if GLIB_CHECK_VERSION(2,31,7)
 			GMutex *m = &(p->mutex);
+#else
+			GMutex *m = p->mutex;
+#endif
 
 			if (p->ioc)
 				g_io_channel_unref (p->ioc);
diff --git a/tools/browser/browser-page.c b/tools/browser/browser-page.c
index a25baf5..07c8804 100644
--- a/tools/browser/browser-page.c
+++ b/tools/browser/browser-page.c
@@ -25,7 +25,7 @@ static GRecMutex init_rmutex;
 #define MUTEX_UNLOCK() g_rec_mutex_unlock(&init_rmutex)
 #else
 static GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
-define MUTEX_LOCK() g_static_rec_mutex_lock(&init_mutex)
+#define MUTEX_LOCK() g_static_rec_mutex_lock(&init_mutex)
 #define MUTEX_UNLOCK() g_static_rec_mutex_unlock(&init_mutex)
 #endif
 static void browser_page_class_init (gpointer g_class);
diff --git a/tools/browser/browser-perspective.c b/tools/browser/browser-perspective.c
index 2361efc..605ee66 100644
--- a/tools/browser/browser-perspective.c
+++ b/tools/browser/browser-perspective.c
@@ -28,7 +28,7 @@ static GRecMutex init_rmutex;
 #define MUTEX_UNLOCK() g_rec_mutex_unlock(&init_rmutex)
 #else
 static GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
-define MUTEX_LOCK() g_static_rec_mutex_lock(&init_mutex)
+#define MUTEX_LOCK() g_static_rec_mutex_lock(&init_mutex)
 #define MUTEX_UNLOCK() g_static_rec_mutex_unlock(&init_mutex)
 #endif
 static void browser_perspective_class_init (gpointer g_class);



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