[evolution-data-server] Remove pointless ENABLE_THREADS define.



commit ec36aa4b96e7efa232bdad4f42aa0fc354ae83ed
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jun 25 13:37:56 2011 -0400

    Remove pointless ENABLE_THREADS define.
    
    Of course we enable thread support.  We love threads!  And lots of
    complex mutex locking!  It's great job security.  </sarcasm>

 camel/providers/imap/camel-imap-folder.c  |    4 ----
 camel/providers/imap/camel-imap-private.h |   16 ----------------
 configure.ac                              |    6 ------
 3 files changed, 0 insertions(+), 26 deletions(-)
---
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 17de53a..df5b7df 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -224,10 +224,8 @@ imap_folder_finalize (GObject *object)
 
 	imap_folder = CAMEL_IMAP_FOLDER (object);
 
-#ifdef ENABLE_THREADS
 	g_static_mutex_free (&imap_folder->priv->search_lock);
 	g_static_rec_mutex_free (&imap_folder->priv->cache_lock);
-#endif
 
 	/* Chain up to parent's finalize() method. */
 	G_OBJECT_CLASS (camel_imap_folder_parent_class)->finalize (object);
@@ -312,10 +310,8 @@ camel_imap_folder_init (CamelImapFolder *imap_folder)
 	folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
 				 CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
 
-#ifdef ENABLE_THREADS
 	g_static_mutex_init (&imap_folder->priv->search_lock);
 	g_static_rec_mutex_init (&imap_folder->priv->cache_lock);
-#endif
 	imap_folder->priv->ignore_recent = NULL;
 
 	imap_folder->journal = NULL;
diff --git a/camel/providers/imap/camel-imap-private.h b/camel/providers/imap/camel-imap-private.h
index 542a8ac..bfa929c 100644
--- a/camel/providers/imap/camel-imap-private.h
+++ b/camel/providers/imap/camel-imap-private.h
@@ -11,15 +11,12 @@
 G_BEGIN_DECLS
 
 struct _CamelImapFolderPrivate {
-#ifdef ENABLE_THREADS
 	GStaticMutex search_lock;	/* for locking the search object */
 	GStaticRecMutex cache_lock;	/* for locking the cache object */
-#endif
 	GHashTable *ignore_recent;	/* hash table of UIDs to ignore as recent when updating folder */
 	gboolean check_folder;		/* persistent property */
 };
 
-#ifdef ENABLE_THREADS
 #define CAMEL_IMAP_FOLDER_LOCK(f, l) \
 	(g_static_mutex_lock (&((CamelImapFolder *) f)->priv->l))
 #define CAMEL_IMAP_FOLDER_UNLOCK(f, l) \
@@ -28,26 +25,13 @@ struct _CamelImapFolderPrivate {
 	(g_static_rec_mutex_lock (&((CamelImapFolder *) f)->priv->l))
 #define CAMEL_IMAP_FOLDER_REC_UNLOCK(f, l) \
 	(g_static_rec_mutex_unlock (&((CamelImapFolder *) f)->priv->l))
-#else
-#define CAMEL_IMAP_FOLDER_LOCK(obj)
-#define CAMEL_IMAP_FOLDER_UNLOCK(obj)
-#define CAMEL_IMAP_FOLDER_REC_LOCK(obj)
-#define CAMEL_IMAP_FOLDER_REC_UNLOCK(obj)
-#endif
 
 struct _CamelImapWrapperPrivate {
-#ifdef ENABLE_THREADS
 	GMutex *lock;
-#endif
 };
 
-#ifdef ENABLE_THREADS
 #define CAMEL_IMAP_WRAPPER_LOCK(f, l) (g_mutex_lock(((CamelImapWrapper *)f)->priv->l))
 #define CAMEL_IMAP_WRAPPER_UNLOCK(f, l) (g_mutex_unlock(((CamelImapWrapper *)f)->priv->l))
-#else
-#define CAMEL_IMAP_WRAPPER_LOCK(f, l)
-#define CAMEL_IMAP_WRAPPER_UNLOCK(f, l)
-#endif
 
 G_END_DECLS
 
diff --git a/configure.ac b/configure.ac
index 9c98e61..c4e3e7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1192,12 +1192,6 @@ EVO_MARSHAL_RULE=$srcdir/marshal.mk
 AC_SUBST_FILE(EVO_MARSHAL_RULE)
 
 dnl ******************************
-dnl Posix thread support
-dnl ******************************
-
-AC_DEFINE(ENABLE_THREADS,1,[Required])
-
-dnl ******************************
 dnl Utility macro to set compiler flags for a specific lib.
 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
 dnl ******************************



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