From d8cf293c94dabeb94370b8a53784db2c19967a9d Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 4 Mar 2012 18:38:54 +0200 Subject: [PATCH] build: implicitly include config.h config.h is meant to be around in all files, as it contains stuff like _GNU_SOURCE, NDEBUG and HAVE_*. Make these definitions available without needing to #include config.h every single time. Signed-off-by: Ran Benita Signed-off-by: David Herrmann --- Makefile.am | 1 + src/log.h | 2 -- src/pty.c | 3 --- tests/test_console.c | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index ee492f0..1702b2e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,6 +11,7 @@ noinst_LTLIBRARIES = libkmscon-core.la AM_CFLAGS = \ -Wall AM_CPPFLAGS = \ + -include $(top_builddir)/config.h \ -I $(srcdir)/src \ -I $(srcdir)/external AM_LDFLAGS = \ diff --git a/src/log.h b/src/log.h index 7974b73..9d19f14 100644 --- a/src/log.h +++ b/src/log.h @@ -38,8 +38,6 @@ #include #include -#include "config.h" - /* LOG_EMERG and LOG_ALERT do not make sense for this application */ #define LOG_CRIT "<2>" /* error that cannot be handled correctly */ #define LOG_ERR "<3>" /* error detected */ diff --git a/src/pty.c b/src/pty.c index c88d603..d7a7f3f 100644 --- a/src/pty.c +++ b/src/pty.c @@ -23,9 +23,6 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* for pty functions */ -#define _XOPEN_SOURCE 700 - #include #include #include diff --git a/tests/test_console.c b/tests/test_console.c index 723d678..f10a0c6 100644 --- a/tests/test_console.c +++ b/tests/test_console.c @@ -39,8 +39,6 @@ * $ ls -la | ./test_console */ -#define _BSD_SOURCE - #include #include #include