diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/cairo-test-trace.c | 10 | ||||
-rw-r--r-- | test/cairo-test.c | 6 |
3 files changed, 12 insertions, 8 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 28909177..a6e8be32 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -77,6 +77,7 @@ cairo_test_suite_SOURCES = \ $(cairo_test_suite_headers) \ $(test_sources) \ cairo-test-constructors.c +cairo_test_suite_CFLAGS = $(AM_CFLAGS) cairo_test_suite_LDADD = \ $(top_builddir)/test/pdiff/libpdiff.la \ $(top_builddir)/boilerplate/libcairoboilerplate.la \ @@ -91,6 +92,7 @@ cairo_test_suite_DEPENDENCIES += \ any2ppm endif if HAVE_PTHREAD +cairo_test_suite_CFLAGS += -pthread cairo_test_suite_LDADD += -lpthread endif @@ -100,6 +102,7 @@ cairo_test_trace_SOURCES = \ cairo-test-trace.c \ buffer-diff.c \ buffer-diff.h +cairo_test_trace_CFLAGS = $(AM_CFLAGS) cairo_test_trace_LDADD = \ $(top_builddir)/test/pdiff/libpdiff.la \ $(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \ @@ -108,6 +111,7 @@ cairo_test_trace_LDADD = \ $(CAIRO_LDADD) \ $(SHM_LIBS) if HAVE_PTHREAD +cairo_test_trace_CFLAGS += -pthread cairo_test_trace_LDADD += -lpthread endif cairo_test_trace_DEPENDENCIES = \ diff --git a/test/cairo-test-trace.c b/test/cairo-test-trace.c index 1d12f53d..2401d171 100644 --- a/test/cairo-test-trace.c +++ b/test/cairo-test-trace.c @@ -82,7 +82,7 @@ #include <sys/un.h> #include <errno.h> #include <assert.h> -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD #include <pthread.h> #endif @@ -162,7 +162,7 @@ struct surface_tag { }; static const cairo_user_data_key_t surface_tag; -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD #define tr_die(t) t->is_meta ? pthread_exit(NULL) : exit(1) #else #define tr_die(t) exit(1) @@ -245,7 +245,7 @@ send_meta_surface (test_runner_t *tr, int width, int height, struct context_closure *closure) { -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD const struct request_image rq = { closure->id, closure->start_line, @@ -591,7 +591,7 @@ spawn_target (const char *socket_path, exit (0); } -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD static void cleanup_recorder (void *arg) { @@ -1274,7 +1274,7 @@ _test_trace (test_trace_t *test, s = slaves = xcalloc (2*test->num_targets + 1, sizeof (struct slave)); -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD /* set-up a meta-surface to reconstruct errors */ slave = spawn_recorder (socket_path, trace); if (slave < 0) { diff --git a/test/cairo-test.c b/test/cairo-test.c index 72288656..edc9ae57 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -47,7 +47,7 @@ #if HAVE_FCFINI #include <fontconfig/fontconfig.h> #endif -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD #include <pthread.h> #endif #if HAVE_SYS_STAT_H @@ -1785,7 +1785,7 @@ _cairo_test_context_run (cairo_test_context_t *ctx) return ret; } -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD typedef struct _cairo_test_thread { pthread_t thread; cairo_test_context_t *ctx; @@ -1820,7 +1820,7 @@ cairo_test_expecting (const cairo_test_t *test) _cairo_test_init (&ctx, NULL, test, test->name); printf ("%s\n", test->description); -#if HAVE_PTHREAD_H +#if CAIRO_HAS_PTHREAD num_threads = 0; if (getenv ("CAIRO_TEST_NUM_THREADS")) num_threads = atoi (getenv ("CAIRO_TEST_NUM_THREADS")); |