summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-09-02 21:50:08 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-09-02 21:54:09 -0400
commita7951081f153934cbf93215c5e255b99ec3e1157 (patch)
tree48aaed15a91447f6b27cfb80031f717d4556aafc /test
parentb4cee2bd88f36b2eddacfe91726b698ae61c819b (diff)
Move _GNU_SOURCE declarations to where it's used
Such that we don't rely on more GNU extensions accidentally.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am6
-rw-r--r--test/cairo-test.c2
-rw-r--r--test/invalid-matrix.c5
3 files changed, 6 insertions, 7 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 7f837138..fcc16015 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -825,16 +825,10 @@ check-local:
check_PROGRAMS =
EXTRA_PROGRAMS =
-# We're using _GNU_SOURCE to get the prototype for asprintf. This may
-# not be the most portable approach, but it is pragmatic and I'm
-# willing to do something cleaner as soon as it causes someone a
-# problem.
INCLUDES = \
- -D_GNU_SOURCE \
-I$(srcdir) \
-I$(srcdir)/pdiff \
-I$(top_srcdir)/boilerplate \
- -I$(top_srcdir)/pixman/src \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
$(CAIRO_CFLAGS)
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 6c04f8ce..b29ffb9c 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -23,6 +23,8 @@
* Author: Carl D. Worth <cworth@cworth.org>
*/
+#define _GNU_SOURCE 1 /* for feenableexcept() et al */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c
index 8db3df13..be113369 100644
--- a/test/invalid-matrix.c
+++ b/test/invalid-matrix.c
@@ -24,9 +24,12 @@
* Author: Carl Worth <cworth@cworth.org>
*/
+#define _ISOC99_SOURCE /* for INFINITY */
+#define _GNU_SOURCE 1 /* for fedisableeexcept() et al */
+
#include "cairo-test.h"
-#if _XOPEN_SOURCE >= 600 || defined (_ISOC99_SOURCE)
+#ifdef INFINITY
#define HAVE_INFINITY 1
#endif