mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 21:58:04 +02:00
Move _GNU_SOURCE declarations to where it's used
Such that we don't rely on more GNU extensions accidentally.
This commit is contained in:
parent
b4cee2bd88
commit
a7951081f1
6 changed files with 10 additions and 12 deletions
|
|
@ -1,9 +1,4 @@
|
|||
# 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$(top_srcdir)/boilerplate \
|
||||
-I$(top_srcdir)/src \
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* for round() */
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
* Carl Worth <cworth@cworth.org>
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE 1 /* for sched_getaffinity() */
|
||||
|
||||
#include "cairo-perf.h"
|
||||
|
||||
#include "cairo-boilerplate-getopt.h"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue