From 37566b71e5598181de2ecdb390a8cab19786f4e1 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 9 Oct 2015 15:50:25 -0400 Subject: [PATCH] Port: Include config.h globally trough DEFAULT_INCLUDES MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- configure.ac | 5 ++++- converter/babeltrace-log.c | 2 -- converter/babeltrace.c | 2 -- include/babeltrace/compat/fcntl.h | 2 -- include/babeltrace/compat/memstream.h | 3 --- include/babeltrace/compat/send.h | 2 -- include/babeltrace/compat/uuid.h | 2 -- tests/lib/common.c | 1 - tests/lib/test_bitfield.c | 1 - tests/lib/test_ctf_writer.c | 1 - tests/lib/test_seek.c | 2 +- tests/utils/tap/tap.c | 1 - 12 files changed, 5 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index 29636c8a..5bcc068f 100644 --- a/configure.ac +++ b/configure.ac @@ -197,9 +197,12 @@ PKG_CHECK_MODULES(GMODULE, [$pkg_modules]) AC_SUBST(PACKAGE_LIBS) LIBS="$LIBS $GMODULE_LIBS" -PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Wformat -include config.h" +PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Wformat" AC_SUBST(PACKAGE_CFLAGS) +DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/include -include config.h" +AC_SUBST(DEFAULT_INCLUDES) + babeltraceincludedir="${includedir}/babeltrace" AC_SUBST(babeltraceincludedir) diff --git a/converter/babeltrace-log.c b/converter/babeltrace-log.c index 55eabf2d..210bd091 100644 --- a/converter/babeltrace-log.c +++ b/converter/babeltrace-log.c @@ -28,8 +28,6 @@ * Depends on glibc 2.10 for getline(). */ -#define _GNU_SOURCE -#include #include #include #include diff --git a/converter/babeltrace.c b/converter/babeltrace.c index 0ceca0c4..c521ac15 100644 --- a/converter/babeltrace.c +++ b/converter/babeltrace.c @@ -26,8 +26,6 @@ * SOFTWARE. */ -#define _GNU_SOURCE -#include #include #include #include diff --git a/include/babeltrace/compat/fcntl.h b/include/babeltrace/compat/fcntl.h index e5232b4c..47e5effc 100644 --- a/include/babeltrace/compat/fcntl.h +++ b/include/babeltrace/compat/fcntl.h @@ -27,8 +27,6 @@ * SOFTWARE. */ -#include - #ifdef BABELTRACE_HAVE_POSIX_FALLOCATE #include diff --git a/include/babeltrace/compat/memstream.h b/include/babeltrace/compat/memstream.h index d2a96cb5..8689aa70 100644 --- a/include/babeltrace/compat/memstream.h +++ b/include/babeltrace/compat/memstream.h @@ -27,9 +27,6 @@ * SOFTWARE. */ -#define _GNU_SOURCE -#include - #ifdef BABELTRACE_HAVE_FMEMOPEN #include diff --git a/include/babeltrace/compat/send.h b/include/babeltrace/compat/send.h index 5654d95f..98e1feb8 100644 --- a/include/babeltrace/compat/send.h +++ b/include/babeltrace/compat/send.h @@ -25,8 +25,6 @@ * SOFTWARE. */ -#include - /* * This wrapper is used on platforms that have no way of ignoring SIGPIPE * during a send(). Instead, we set the signal action to ignore. This is OK diff --git a/include/babeltrace/compat/uuid.h b/include/babeltrace/compat/uuid.h index 65a72704..369e4780 100644 --- a/include/babeltrace/compat/uuid.h +++ b/include/babeltrace/compat/uuid.h @@ -25,8 +25,6 @@ * SOFTWARE. */ -#include - /* Includes final \0. */ #define BABELTRACE_UUID_STR_LEN 37 #define BABELTRACE_UUID_LEN 16 diff --git a/tests/lib/common.c b/tests/lib/common.c index 25bf735e..60e2be04 100644 --- a/tests/lib/common.c +++ b/tests/lib/common.c @@ -18,7 +18,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #include #include diff --git a/tests/lib/test_bitfield.c b/tests/lib/test_bitfield.c index 16e8a57e..b14883df 100644 --- a/tests/lib/test_bitfield.c +++ b/tests/lib/test_bitfield.c @@ -19,7 +19,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #include #include #include diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index eb4b1b4d..4ea02bcc 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -19,7 +19,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #include #include #include diff --git a/tests/lib/test_seek.c b/tests/lib/test_seek.c index 4e1a8232..3c78e8ad 100644 --- a/tests/lib/test_seek.c +++ b/tests/lib/test_seek.c @@ -18,7 +18,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE + #include #include #include diff --git a/tests/utils/tap/tap.c b/tests/utils/tap/tap.c index 8bf72f6f..08dfa658 100644 --- a/tests/utils/tap/tap.c +++ b/tests/utils/tap/tap.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#define _GNU_SOURCE #include #include #include -- 2.34.1