From fb54defd7e47e106bdf3b7eb07d53f0aba0525ec Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 17 Jul 2020 15:08:41 -0400 Subject: [PATCH] Cleanup: standardise include path Use the same include setup as our other projects, set the default includes globally in configure.ac by exporting AM_CPPFLAGS. Move the local config.h to the include directory and include it by default on the command line. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I28b48dc47cfc923d588a0033b97c2917a9c893a5 --- .gitignore | 6 +++--- configure.ac | 11 +++++++++-- doc/examples/Makefile.am | 4 ++-- include/ust-comm.h | 1 - liblttng-ust-comm/Makefile.am | 2 -- liblttng-ust-comm/lttng-ust-comm.c | 1 - liblttng-ust-comm/lttng-ust-fd-tracker.c | 1 - liblttng-ust-ctl/Makefile.am | 2 +- liblttng-ust-ctl/ustctl.c | 1 - liblttng-ust-cyg-profile/Makefile.am | 3 +-- liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c | 1 - liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c | 1 - liblttng-ust-dl/Makefile.am | 3 +-- liblttng-ust-dl/lttng-ust-dl.c | 1 - liblttng-ust-dl/ust_dl.c | 1 - liblttng-ust-dl/ust_dl.h | 1 - liblttng-ust-fd/Makefile.am | 1 - liblttng-ust-fd/lttng-ust-fd.c | 1 - liblttng-ust-fork/Makefile.am | 1 - liblttng-ust-fork/ustfork.c | 1 - liblttng-ust-java-agent/jni/common/Makefile.am | 2 +- liblttng-ust-java-agent/jni/jul/Makefile.am | 2 +- liblttng-ust-java-agent/jni/log4j/Makefile.am | 2 +- liblttng-ust-java/Makefile.am | 2 +- liblttng-ust-libc-wrapper/Makefile.am | 3 +-- liblttng-ust-libc-wrapper/lttng-ust-malloc.c | 1 - liblttng-ust-libc-wrapper/lttng-ust-pthread.c | 1 - liblttng-ust-python-agent/Makefile.am | 4 +--- liblttng-ust/Makefile.am | 3 +-- liblttng-ust/lttng-clock.c | 1 - liblttng-ust/lttng-context-cpu-id.c | 1 - liblttng-ust/lttng-context-vsgid.c | 1 - liblttng-ust/lttng-context-vsuid.c | 1 - liblttng-ust/lttng-events.c | 1 - liblttng-ust/lttng-getcpu.c | 1 - liblttng-ust/lttng-ring-buffer-client-discard-rt.c | 1 - liblttng-ust/lttng-ring-buffer-client-discard.c | 1 - liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c | 1 - liblttng-ust/lttng-ring-buffer-client-overwrite.c | 1 - liblttng-ust/lttng-ring-buffer-metadata-client.c | 1 - liblttng-ust/lttng-ust-comm.c | 1 - liblttng-ust/lttng-ust-dynamic-type.c | 1 - liblttng-ust/lttng-ust-elf.c | 1 - liblttng-ust/lttng-ust-statedump.c | 1 - liblttng-ust/tracef.c | 1 - liblttng-ust/tracelog.c | 1 - libringbuffer/Makefile.am | 1 - libringbuffer/getcpu.h | 1 - libringbuffer/ring_buffer_backend.c | 1 - libringbuffer/ring_buffer_frontend.c | 1 - libringbuffer/shm.c | 1 - libringbuffer/smp.c | 1 - snprintf/Makefile.am | 2 +- tests/benchmark/Makefile.am | 2 +- tests/benchmark/bench.c | 1 - tests/ctf-types/Makefile.am | 2 +- tests/gcc-weak-hidden/Makefile.am | 2 +- tests/hello-many/Makefile.am | 2 +- tests/hello.cxx/Makefile.am | 2 +- tests/hello/Makefile.am | 2 +- tests/same_line_tracepoint/Makefile.am | 2 +- tests/snprintf/Makefile.am | 2 +- tests/test-app-ctx/Makefile.am | 2 +- tests/ust-elf/Makefile.am | 2 +- tests/utils/tap.c | 1 - 65 files changed, 35 insertions(+), 76 deletions(-) diff --git a/.gitignore b/.gitignore index f2bf66e2..a6618cb1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,12 +18,13 @@ cscope.* configure /aclocal.m4 autom4te.cache/ -/config.h +/include/config.h +/include/config.h.in +/include/stamp-h1 /include/lttng/config.h /include/lttng/stamp-h2 /include/lttng/ust-version.h /include/lttng/ust-config.h -/config.h.in /config/ar-lib /config/compile /config/config.guess @@ -42,7 +43,6 @@ autom4te.cache/ /m4/ltversion.m4 config.log config.status -/stamp-h1 /libtool lttng-ust.pc lttng-ust-ctl.pc diff --git a/configure.ac b/configure.ac index 02d7f40c..15fb6805 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ AC_DEFINE([CONFIG_LTTNG_UST_LIBRARY_VERSION_MAJOR], [UST_LIB_V_MAJOR], [Major SO # liblttng-ust, lttng-sessiond, and lttng-consumerd. AC_SUBST([LTTNG_UST_CTL_LIBRARY_VERSION], [4:0:0]) -AC_CONFIG_HEADERS([config.h include/lttng/ust-config.h]) +AC_CONFIG_HEADERS([include/config.h include/lttng/ust-config.h]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([include/lttng/tracepoint.h]) @@ -41,7 +41,7 @@ AC_CONFIG_SRCDIR([include/lttng/tracepoint.h]) AC_CANONICAL_TARGET AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-ustar]) +AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-ustar nostdinc]) AM_MAINTAINER_MODE([enable]) # Enable silent rules if available (Introduced in AM 1.11) @@ -524,6 +524,13 @@ _AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000]) AM_CFLAGS="-Wall $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS) + +# The order in which the include folders are searched is important. +# The top_builddir should always be searched first in the event that a build +# time generated file is included. +AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -include config.h" +AC_SUBST(AM_CPPFLAGS) + AC_SUBST(JNI_CPPFLAGS) AC_CONFIG_FILES([ diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 70ebe195..73fadf5a 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -180,8 +180,8 @@ all-local: cmake \ -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \ -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \ - -DCMAKE_C_FLAGS="$(AM_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)" \ - -DCMAKE_CXX_FLAGS="$(AM_CXXFLAGS) $(AM_CPPFLAGS) $(CXXFLAGS) $(CPPFLAGS)" \ + -DCMAKE_C_FLAGS="$(AM_CFLAGS) $(CPPFLAGS) $(CFLAGS)" \ + -DCMAKE_CXX_FLAGS="$(AM_CXXFLAGS) $(CXXFLAGS) $(CPPFLAGS)" \ -DCMAKE_EXE_LINKER_FLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \ .. && \ $(MAKE) \ diff --git a/include/ust-comm.h b/include/ust-comm.h index a5e09572..ed241e30 100644 --- a/include/ust-comm.h +++ b/include/ust-comm.h @@ -33,7 +33,6 @@ #include #include #include -#include #ifndef LTTNG_PACKED #error "LTTNG_PACKED should be defined" diff --git a/liblttng-ust-comm/Makefile.am b/liblttng-ust-comm/Makefile.am index b9043065..bc0fd4c5 100644 --- a/liblttng-ust-comm/Makefile.am +++ b/liblttng-ust-comm/Makefile.am @@ -1,5 +1,3 @@ -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include - noinst_LTLIBRARIES = liblttng-ust-comm.la liblttng_ust_comm_la_SOURCES = lttng-ust-comm.c lttng-ust-fd-tracker.c diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index f9398e0d..619424cd 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #include #include #include diff --git a/liblttng-ust-comm/lttng-ust-fd-tracker.c b/liblttng-ust-comm/lttng-ust-fd-tracker.c index 9659f349..192e240e 100644 --- a/liblttng-ust-comm/lttng-ust-fd-tracker.c +++ b/liblttng-ust-comm/lttng-ust-fd-tracker.c @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #include #include #include diff --git a/liblttng-ust-ctl/Makefile.am b/liblttng-ust-ctl/Makefile.am index 6043d17c..8d586a76 100644 --- a/liblttng-ust-ctl/Makefile.am +++ b/liblttng-ust-ctl/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/liblttng-ust-comm -I$(top_builddir)/include +AM_CPPFLAGS += -I$(top_srcdir)/liblttng-ust-comm AM_CFLAGS += -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-ctl.la diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index a7eca3b0..a6fb6d83 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -16,7 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #include #include #include diff --git a/liblttng-ust-cyg-profile/Makefile.am b/liblttng-ust-cyg-profile/Makefile.am index 3b1e7eba..a3a2ff92 100644 --- a/liblttng-ust-cyg-profile/Makefile.am +++ b/liblttng-ust-cyg-profile/Makefile.am @@ -1,5 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -AM_CFLAGS += -fno-strict-aliasing +AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-cyg-profile.la \ liblttng-ust-cyg-profile-fast.la diff --git a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c index 61ece1f8..4e4e7180 100644 --- a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c +++ b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c index d19f70a6..2fa73b2c 100644 --- a/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c +++ b/liblttng-ust-cyg-profile/lttng-ust-cyg-profile.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust-dl/Makefile.am b/liblttng-ust-dl/Makefile.am index 1f6d166a..8df6eb57 100644 --- a/liblttng-ust-dl/Makefile.am +++ b/liblttng-ust-dl/Makefile.am @@ -1,5 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -AM_CFLAGS += -fno-strict-aliasing +AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-dl.la liblttng_ust_dl_la_SOURCES = \ diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index e38eaf1e..5509597e 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust-dl/ust_dl.c b/liblttng-ust-dl/ust_dl.c index 23241432..b25ba7b9 100644 --- a/liblttng-ust-dl/ust_dl.c +++ b/liblttng-ust-dl/ust_dl.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #define TRACEPOINT_CREATE_PROBES #define TP_IP_PARAM ip diff --git a/liblttng-ust-dl/ust_dl.h b/liblttng-ust-dl/ust_dl.h index 0ea21266..e43535e2 100644 --- a/liblttng-ust-dl/ust_dl.h +++ b/liblttng-ust-dl/ust_dl.h @@ -34,7 +34,6 @@ extern "C" { #include #include #include -#include #define LTTNG_UST_DL_PROVIDER #include diff --git a/liblttng-ust-fd/Makefile.am b/liblttng-ust-fd/Makefile.am index 57122ec7..f253c61f 100644 --- a/liblttng-ust-fd/Makefile.am +++ b/liblttng-ust-fd/Makefile.am @@ -1,4 +1,3 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS += -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-fd.la diff --git a/liblttng-ust-fd/lttng-ust-fd.c b/liblttng-ust-fd/lttng-ust-fd.c index 7bb3cecf..02c40d8c 100644 --- a/liblttng-ust-fd/lttng-ust-fd.c +++ b/liblttng-ust-fd/lttng-ust-fd.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust-fork/Makefile.am b/liblttng-ust-fork/Makefile.am index d05f5b93..de318c92 100644 --- a/liblttng-ust-fork/Makefile.am +++ b/liblttng-ust-fork/Makefile.am @@ -1,4 +1,3 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS += -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-fork.la diff --git a/liblttng-ust-fork/ustfork.c b/liblttng-ust-fork/ustfork.c index 983ed04f..3c0037ee 100644 --- a/liblttng-ust-fork/ustfork.c +++ b/liblttng-ust-fork/ustfork.c @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #include #include #include diff --git a/liblttng-ust-java-agent/jni/common/Makefile.am b/liblttng-ust-java-agent/jni/common/Makefile.am index 1baf306d..5fb6b2b3 100644 --- a/liblttng-ust-java-agent/jni/common/Makefile.am +++ b/liblttng-ust-java-agent/jni/common/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS) +AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS) lib_LTLIBRARIES = liblttng-ust-context-jni.la liblttng_ust_context_jni_la_SOURCES = lttng_ust_context.c lttng_ust_context.h diff --git a/liblttng-ust-java-agent/jni/jul/Makefile.am b/liblttng-ust-java-agent/jni/jul/Makefile.am index 39ff52a0..bba12844 100644 --- a/liblttng-ust-java-agent/jni/jul/Makefile.am +++ b/liblttng-ust-java-agent/jni/jul/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS) +AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS) lib_LTLIBRARIES = liblttng-ust-jul-jni.la liblttng_ust_jul_jni_la_SOURCES = lttng_ust_jul.c \ diff --git a/liblttng-ust-java-agent/jni/log4j/Makefile.am b/liblttng-ust-java-agent/jni/log4j/Makefile.am index 188597d2..4e007244 100644 --- a/liblttng-ust-java-agent/jni/log4j/Makefile.am +++ b/liblttng-ust-java-agent/jni/log4j/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS) +AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS) lib_LTLIBRARIES = liblttng-ust-log4j-jni.la liblttng_ust_log4j_jni_la_SOURCES = lttng_ust_log4j.c \ diff --git a/liblttng-ust-java/Makefile.am b/liblttng-ust-java/Makefile.am index 387ddba9..dc4bbc68 100644 --- a/liblttng-ust-java/Makefile.am +++ b/liblttng-ust-java/Makefile.am @@ -7,7 +7,7 @@ dist_noinst_JAVA = $(pkgpath)/LTTngUst.java jar_DATA = $(jarfile) BUILT_SOURCES = org_lttng_ust_LTTngUst.h -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS) +AM_CPPFLAGS += -I$(builddir) -I$(srcdir) $(JNI_CPPFLAGS) lib_LTLIBRARIES = liblttng-ust-java.la liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h diff --git a/liblttng-ust-libc-wrapper/Makefile.am b/liblttng-ust-libc-wrapper/Makefile.am index 68aa02c7..12e81966 100644 --- a/liblttng-ust-libc-wrapper/Makefile.am +++ b/liblttng-ust-libc-wrapper/Makefile.am @@ -1,5 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -AM_CFLAGS += -fno-strict-aliasing +AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-libc-wrapper.la \ liblttng-ust-pthread-wrapper.la diff --git a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c index 9e7d1e63..f9081a09 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE /* * Do _not_ define _LGPL_SOURCE because we don't want to create a * circular dependency loop between this malloc wrapper, liburcu and diff --git a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c index 7836ffa0..1e65207f 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE /* * Do _not_ define _LGPL_SOURCE because we don't want to create a * circular dependency loop between this malloc wrapper, liburcu and diff --git a/liblttng-ust-python-agent/Makefile.am b/liblttng-ust-python-agent/Makefile.am index 077e50c5..43cc27a8 100644 --- a/liblttng-ust-python-agent/Makefile.am +++ b/liblttng-ust-python-agent/Makefile.am @@ -1,7 +1,5 @@ # tracepoint provider: always built/installed (does not depend on Python per se) -AM_CPPFLAGS = -I$(top_srcdir)/include/ \ - -I$(top_builddir)/include/ -AM_CFLAGS += -fno-strict-aliasing +AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing lib_LTLIBRARIES = liblttng-ust-python-agent.la diff --git a/liblttng-ust/Makefile.am b/liblttng-ust/Makefile.am index 3c7da7e6..169db329 100644 --- a/liblttng-ust/Makefile.am +++ b/liblttng-ust/Makefile.am @@ -1,5 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -AM_CFLAGS += -fno-strict-aliasing +AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing noinst_LTLIBRARIES = liblttng-ust-runtime.la liblttng-ust-support.la diff --git a/liblttng-ust/lttng-clock.c b/liblttng-ust/lttng-clock.c index 5c33de0c..2dad3761 100644 --- a/liblttng-ust/lttng-clock.c +++ b/liblttng-ust/lttng-clock.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-context-cpu-id.c b/liblttng-ust/lttng-context-cpu-id.c index 7a9dd5fd..3f6462e6 100644 --- a/liblttng-ust/lttng-context-cpu-id.c +++ b/liblttng-ust/lttng-context-cpu-id.c @@ -26,7 +26,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-context-vsgid.c b/liblttng-ust/lttng-context-vsgid.c index 45fd2860..685264bf 100644 --- a/liblttng-ust/lttng-context-vsgid.c +++ b/liblttng-ust/lttng-context-vsgid.c @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-context-vsuid.c b/liblttng-ust/lttng-context-vsuid.c index f728a31d..650ee7c6 100644 --- a/liblttng-ust/lttng-context-vsuid.c +++ b/liblttng-ust/lttng-context-vsuid.c @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 627cd4e1..d1beac3a 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-getcpu.c b/liblttng-ust/lttng-getcpu.c index 7cc9faa8..7c33b494 100644 --- a/liblttng-ust/lttng-getcpu.c +++ b/liblttng-ust/lttng-getcpu.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-ring-buffer-client-discard-rt.c b/liblttng-ust/lttng-ring-buffer-client-discard-rt.c index d57d5492..60649044 100644 --- a/liblttng-ust/lttng-ring-buffer-client-discard-rt.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard-rt.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include "lttng-tracer.h" diff --git a/liblttng-ust/lttng-ring-buffer-client-discard.c b/liblttng-ust/lttng-ring-buffer-client-discard.c index a5fcc807..856188d0 100644 --- a/liblttng-ust/lttng-ring-buffer-client-discard.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include "lttng-tracer.h" diff --git a/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c b/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c index 1b4fff1b..a245f7bf 100644 --- a/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include "lttng-tracer.h" diff --git a/liblttng-ust/lttng-ring-buffer-client-overwrite.c b/liblttng-ust/lttng-ring-buffer-client-overwrite.c index 5564e8e5..6358e7d5 100644 --- a/liblttng-ust/lttng-ring-buffer-client-overwrite.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include "lttng-tracer.h" diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.c b/liblttng-ust/lttng-ring-buffer-metadata-client.c index f14294a9..59f3215e 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.c +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include "lttng-tracer.h" diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 3847c976..6258bfd2 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -20,7 +20,6 @@ */ #define _LGPL_SOURCE -#define _GNU_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-ust-dynamic-type.c b/liblttng-ust/lttng-ust-dynamic-type.c index 9c72e71f..ba7f96b5 100644 --- a/liblttng-ust/lttng-ust-dynamic-type.c +++ b/liblttng-ust/lttng-ust-dynamic-type.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index 5de3561f..b7c0acb5 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/lttng-ust-statedump.c b/liblttng-ust/lttng-ust-statedump.c index 040223d5..d0094c41 100644 --- a/liblttng-ust/lttng-ust-statedump.c +++ b/liblttng-ust/lttng-ust-statedump.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/tracef.c b/liblttng-ust/tracef.c index fa001ea2..d5d702a8 100644 --- a/liblttng-ust/tracef.c +++ b/liblttng-ust/tracef.c @@ -20,7 +20,6 @@ * SOFTWARE. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/liblttng-ust/tracelog.c b/liblttng-ust/tracelog.c index ed8a067d..c1ed1288 100644 --- a/liblttng-ust/tracelog.c +++ b/liblttng-ust/tracelog.c @@ -20,7 +20,6 @@ * SOFTWARE. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/libringbuffer/Makefile.am b/libringbuffer/Makefile.am index ac9430d6..53b0b148 100644 --- a/libringbuffer/Makefile.am +++ b/libringbuffer/Makefile.am @@ -1,4 +1,3 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS += -fno-strict-aliasing noinst_LTLIBRARIES = libringbuffer.la diff --git a/libringbuffer/getcpu.h b/libringbuffer/getcpu.h index 7b009dc6..ea346cc6 100644 --- a/libringbuffer/getcpu.h +++ b/libringbuffer/getcpu.h @@ -22,7 +22,6 @@ #include #include #include -#include void lttng_ust_getcpu_init(void); diff --git a/libringbuffer/ring_buffer_backend.c b/libringbuffer/ring_buffer_backend.c index f75adbce..46df102b 100644 --- a/libringbuffer/ring_buffer_backend.c +++ b/libringbuffer/ring_buffer_backend.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index dd20852f..4f1af6d0 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -51,7 +51,6 @@ * - put_subbuf */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/libringbuffer/shm.c b/libringbuffer/shm.c index 461befb9..9bcc7d9f 100644 --- a/libringbuffer/shm.c +++ b/libringbuffer/shm.c @@ -19,7 +19,6 @@ */ #define _LGPL_SOURCE -#include #include "shm.h" #include #include diff --git a/libringbuffer/smp.c b/libringbuffer/smp.c index 656a75da..3e0a427b 100644 --- a/libringbuffer/smp.c +++ b/libringbuffer/smp.c @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include diff --git a/snprintf/Makefile.am b/snprintf/Makefile.am index 59b02723..17e698c4 100644 --- a/snprintf/Makefile.am +++ b/snprintf/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libustcomm +AM_CPPFLAGS += -I$(top_srcdir)/libustcomm AM_CFLAGS += -fno-strict-aliasing noinst_LTLIBRARIES = libustsnprintf.la diff --git a/tests/benchmark/Makefile.am b/tests/benchmark/Makefile.am index de44d2e9..94f7e221 100644 --- a/tests/benchmark/Makefile.am +++ b/tests/benchmark/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = bench1 bench2 bench1_SOURCES = bench.c tp.c ust_tests_benchmark.h diff --git a/tests/benchmark/bench.c b/tests/benchmark/bench.c index 517bfb73..3fafe5d1 100644 --- a/tests/benchmark/bench.c +++ b/tests/benchmark/bench.c @@ -20,7 +20,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #include #include #include diff --git a/tests/ctf-types/Makefile.am b/tests/ctf-types/Makefile.am index 0e47359c..8fcb1a2d 100644 --- a/tests/ctf-types/Makefile.am +++ b/tests/ctf-types/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = ctf-types ctf_types_SOURCES = ctf-types.c tp.c ust_tests_ctf_types.h diff --git a/tests/gcc-weak-hidden/Makefile.am b/tests/gcc-weak-hidden/Makefile.am index be9032a3..da3d301b 100644 --- a/tests/gcc-weak-hidden/Makefile.am +++ b/tests/gcc-weak-hidden/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/tests/utils +AM_CPPFLAGS += -I$(top_srcdir)/tests/utils noinst_LTLIBRARIES = libgcc-wh.la libgcc_wh_la_SOURCES = c.c d.c diff --git a/tests/hello-many/Makefile.am b/tests/hello-many/Makefile.am index 577718f5..d8f140b2 100644 --- a/tests/hello-many/Makefile.am +++ b/tests/hello-many/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = hello-many hello_many_SOURCES = hello-many.c tp.c ust_tests_hello_many.h diff --git a/tests/hello.cxx/Makefile.am b/tests/hello.cxx/Makefile.am index f8a718b4..9d809139 100644 --- a/tests/hello.cxx/Makefile.am +++ b/tests/hello.cxx/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = hello hello_SOURCES = hello.cpp tp-cpp.cpp ust_tests_hello.h diff --git a/tests/hello/Makefile.am b/tests/hello/Makefile.am index d249909c..04fb9bef 100644 --- a/tests/hello/Makefile.am +++ b/tests/hello/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = hello hello_SOURCES = hello.c tp.c ust_tests_hello.h diff --git a/tests/same_line_tracepoint/Makefile.am b/tests/same_line_tracepoint/Makefile.am index c2c2bbbf..598dbecc 100644 --- a/tests/same_line_tracepoint/Makefile.am +++ b/tests/same_line_tracepoint/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = same_line_tracepoint same_line_tracepoint_SOURCES = same_line_tracepoint.c ust_tests_sameline.h diff --git a/tests/snprintf/Makefile.am b/tests/snprintf/Makefile.am index 3e2b37c9..db0aca93 100644 --- a/tests/snprintf/Makefile.am +++ b/tests/snprintf/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/tests/utils +AM_CPPFLAGS += -I$(top_srcdir)/tests/utils noinst_PROGRAMS = test_snprintf test_snprintf_SOURCES = snprintf.c diff --git a/tests/test-app-ctx/Makefile.am b/tests/test-app-ctx/Makefile.am index d5e42d33..699165b1 100644 --- a/tests/test-app-ctx/Makefile.am +++ b/tests/test-app-ctx/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers +AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers noinst_PROGRAMS = hello hello_SOURCES = hello.c tp.c ust_tests_hello.h diff --git a/tests/ust-elf/Makefile.am b/tests/ust-elf/Makefile.am index d14f03f7..eadbaa89 100644 --- a/tests/ust-elf/Makefile.am +++ b/tests/ust-elf/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/tests/utils +AM_CPPFLAGS += -I$(top_srcdir)/tests/utils noinst_PROGRAMS = ust-elf ust_elf_SOURCES = ust-elf.c diff --git a/tests/utils/tap.c b/tests/utils/tap.c index 8bf72f6f..08dfa658 100644 --- a/tests/utils/tap.c +++ b/tests/utils/tap.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#define _GNU_SOURCE #include #include #include -- 2.34.1