From ebde7690075525341f9a90a000dcd4a569b0350a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 23 Oct 2014 22:10:17 +0200 Subject: Move feature test macros to config.mk --- config.mk | 3 ++- editor.c | 2 -- text.c | 2 -- vis.c | 4 ---- window.c | 1 - 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/config.mk b/config.mk index c570914..06b69fa 100644 --- a/config.mk +++ b/config.mk @@ -9,7 +9,8 @@ MANPREFIX = ${PREFIX}/share/man INCS = -I. LIBS = -lc -lncursesw -CFLAGS += -std=c99 -Os ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG +CFLAGS += -std=c99 -Os ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 + LDFLAGS += ${LIBS} DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter diff --git a/editor.c b/editor.c index f0123c9..477e069 100644 --- a/editor.c +++ b/editor.c @@ -1,5 +1,3 @@ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE #include #include #include diff --git a/text.c b/text.c index 6a213bf..004de22 100644 --- a/text.c +++ b/text.c @@ -13,8 +13,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE #include #include #include diff --git a/vis.c b/vis.c index 30cf126..fde2b68 100644 --- a/vis.c +++ b/vis.c @@ -13,10 +13,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE -#define _POSIX_SOURCE -/* Necessary for SIGWINCH on OpenBSD */ -#define _BSD_SOURCE #include #include #include diff --git a/window.c b/window.c index 43bae70..82178ec 100644 --- a/window.c +++ b/window.c @@ -13,7 +13,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _XOPEN_SOURCE #include #include #include -- cgit v1.2.3