aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2003-07-10 03:32:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-07-10 03:32:43 +0800
commitdb1672cb6965cdb4ad7dd12844b194025f550349 (patch)
tree015ef7d161fa6836b627a61ef802e11d5b42f69f /camel
parent96d7f1821883b2355e3b9d8fd640595ac699c100 (diff)
downloadgsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.tar
gsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.tar.gz
gsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.tar.bz2
gsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.tar.lz
gsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.tar.xz
gsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.tar.zst
gsoc2013-evolution-db1672cb6965cdb4ad7dd12844b194025f550349.zip
removed #ifdef ENABLE_THREADS
svn path=/trunk/; revision=21779
Diffstat (limited to 'camel')
-rw-r--r--camel/tests/lib/camel-test.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/camel/tests/lib/camel-test.c b/camel/tests/lib/camel-test.c
index 76385ec696..41622cb3ea 100644
--- a/camel/tests/lib/camel-test.c
+++ b/camel/tests/lib/camel-test.c
@@ -5,17 +5,13 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
#include <camel/camel.h>
-#ifdef ENABLE_THREADS
/* well i dunno, doesn't seem to be in the headers but hte manpage mentions it */
/* a nonportable checking mutex for glibc, not really needed, just validates
the test harness really */
@@ -27,11 +23,6 @@ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
#define CAMEL_TEST_LOCK pthread_mutex_lock(&lock)
#define CAMEL_TEST_UNLOCK pthread_mutex_unlock(&lock)
#define CAMEL_TEST_ID (pthread_self())
-#else
-#define CAMEL_TEST_LOCK
-#define CAMEL_TEST_UNLOCK
-#define CAMEL_TEST_ID (0)
-#endif
static int setup;
static int ok;
@@ -57,10 +48,9 @@ static void
dump_action(int id, struct _state *s, void *d)
{
struct _stack *node;
-
-#ifdef ENABLE_THREADS
+
printf("\nThread %d:\n", id);
-#endif
+
node = s->state;
if (node) {
printf("Current action:\n");
@@ -80,13 +70,11 @@ static void die(int sig)
indie = 1;
printf("\n\nReceived fatal signal %d\n", sig);
g_hash_table_foreach(info_table, (GHFunc)dump_action, 0);
-
-#ifdef ENABLE_THREADS
+
if (camel_test_verbose > 2) {
printf("Attach debugger to pid %d to debug\n", getpid());
sleep(1000);
}
-#endif
}
_exit(1);