From 8298ad83ac0af32707d65b17b3a3a63c137a50e6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 1 Aug 2016 14:41:13 -0400 Subject: Use consistent feature test macros --- src/jalv.c | 5 +++-- src/jalv_console.c | 5 +++-- wscript | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/jalv.c b/src/jalv.c index d745c33..c4eb073 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -14,8 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _POSIX_C_SOURCE 200809L /* for mkdtemp */ -#define _DARWIN_C_SOURCE /* for mkdtemp on OSX */ +#define _POSIX_C_SOURCE 200809L /* for mkdtemp */ +#define _DARWIN_C_SOURCE /* for mkdtemp on OSX */ + #include #include #include diff --git a/src/jalv_console.c b/src/jalv_console.c index 10bf0c1..3f6343d 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -1,5 +1,5 @@ /* - Copyright 2007-2014 David Robillard + Copyright 2007-2016 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -14,7 +14,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _XOPEN_SOURCE 500 +#define _POSIX_C_SOURCE 200809L +#define _XOPEN_SOURCE 500 #include #include diff --git a/wscript b/wscript index 2a88b8c..62219bd 100644 --- a/wscript +++ b/wscript @@ -94,7 +94,7 @@ def configure(conf): uselib='JACK', mandatory=False) - defines = ['_POSIX_SOURCE'] + defines = ['_POSIX_C_SOURCE=200809L'] conf.check(function_name='isatty', header_name='unistd.h', @@ -110,7 +110,7 @@ def configure(conf): if conf.is_defined('HAVE_ISATTY') and conf.is_defined('HAVE_FILENO'): autowaf.define(conf, 'JALV_WITH_COLOR', 1) - conf.env.append_unique('CFLAGS', ['-D_POSIX_SOURCE']) + conf.env.append_unique('CFLAGS', ['-D_POSIX_C_SOURCE=200809L']) if not Options.options.no_jack_session: autowaf.define(conf, 'JALV_JACK_SESSION', 1) -- cgit v1.2.1