summaryrefslogtreecommitdiff
path: root/test/cairo-test.c
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2010-06-27 03:03:17 +0300
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2010-07-11 21:40:26 +0300
commitfca8977219b857e2e61dd86ac39ae9f40086f306 (patch)
treea4c13879aa27adf0f3b1c936b973051bee2ed078 /test/cairo-test.c
parent47c35e5e86a3c99fc39afe2e13a7c92d5247ee1e (diff)
downloadcairo-fca8977219b857e2e61dd86ac39ae9f40086f306.tar.gz
build: Rework pthread detection.
Use two levels of pthread support: a minimal level used to build cairo itself, and a full level to build threaded apps which want to use cairo. The minimal level tries to use pthread stubs from libc if possible, but falls back to the full level if that's not possible. We use CFLAGS=-D_REENTRANT LIBS=-lpthread to find a real pthread library since that seems to work on every unix-like test box we can get our hands on.
Diffstat (limited to 'test/cairo-test.c')
-rw-r--r--test/cairo-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 5b80ba13e..69af6ba8a 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -47,7 +47,7 @@
#if HAVE_FCFINI
#include <fontconfig/fontconfig.h>
#endif
-#if CAIRO_HAS_PTHREAD
+#if CAIRO_HAS_REAL_PTHREAD
#include <pthread.h>
#endif
#if HAVE_SYS_STAT_H
@@ -1832,7 +1832,7 @@ _cairo_test_context_run (cairo_test_context_t *ctx)
return ret;
}
-#if CAIRO_HAS_PTHREAD
+#if CAIRO_HAS_REAL_PTHREAD
typedef struct _cairo_test_thread {
pthread_t thread;
cairo_test_context_t *ctx;
@@ -1867,7 +1867,7 @@ cairo_test_expecting (const cairo_test_t *test)
_cairo_test_init (&ctx, NULL, test, test->name);
printf ("%s\n", test->description);
-#if CAIRO_HAS_PTHREAD
+#if CAIRO_HAS_REAL_PTHREAD
num_threads = 0;
if (getenv ("CAIRO_TEST_NUM_THREADS"))
num_threads = atoi (getenv ("CAIRO_TEST_NUM_THREADS"));