From f40ef1d56886bc58f5d7e147d77f818f46b66456 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 14 Oct 2015 16:51:30 -0400 Subject: [PATCH] Rename config.h to session-config.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The global config.h is included on the command line with the gcc '-include' switch which searches the local directory before the include path. This leads to a namespace collision with 'src/common/config/config.h'. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- src/bin/lttng-relayd/main.c | 4 ++-- src/bin/lttng-sessiond/load-session-thread.c | 2 +- src/bin/lttng-sessiond/main.c | 4 ++-- src/bin/lttng-sessiond/save.c | 2 +- src/bin/lttng/commands/load.c | 2 +- src/common/config/Makefile.am | 3 ++- src/common/config/{config.c => session-config.c} | 2 +- src/common/config/{config.h => session-config.h} | 0 src/common/mi-lttng.c | 2 +- src/common/mi-lttng.h | 2 +- src/lib/lttng-ctl/load.c | 2 +- tests/unit/ini_config/ini_config.c | 2 +- 12 files changed, 14 insertions(+), 13 deletions(-) rename src/common/config/{config.c => session-config.c} (99%) rename src/common/config/{config.h => session-config.h} (100%) diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 58fb457b3..7fc2fb503 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include "cmd.h" @@ -305,7 +305,7 @@ end: /* * config_entry_handler_cb used to handle options read from a config file. - * See config_entry_handler_cb comment in common/config/config.h for the + * See config_entry_handler_cb comment in common/config/session-config.h for the * return value conventions. */ static int config_entry_handler(const struct config_entry *entry, void *unused) diff --git a/src/bin/lttng-sessiond/load-session-thread.c b/src/bin/lttng-sessiond/load-session-thread.c index 38451107c..4c08791f1 100644 --- a/src/bin/lttng-sessiond/load-session-thread.c +++ b/src/bin/lttng-sessiond/load-session-thread.c @@ -17,7 +17,7 @@ #define _LGPL_SOURCE #include -#include +#include #include "load-session-thread.h" #include "lttng-sessiond.h" diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 77f059a76..c1f466ed7 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include "lttng-sessiond.h" #include "buffer-registry.h" @@ -4901,7 +4901,7 @@ end: /* * config_entry_handler_cb used to handle options read from a config file. - * See config_entry_handler_cb comment in common/config/config.h for the + * See config_entry_handler_cb comment in common/config/session-config.h for the * return value conventions. */ static int config_entry_handler(const struct config_entry *entry, void *unused) diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index 3df1f2828..cc7bfe1e0 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/bin/lttng/commands/load.c b/src/bin/lttng/commands/load.c index 68c0776ad..cb3eb75aa 100644 --- a/src/bin/lttng/commands/load.c +++ b/src/bin/lttng/commands/load.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include "../command.h" diff --git a/src/common/config/Makefile.am b/src/common/config/Makefile.am index e36b42fb0..6e33d5b60 100644 --- a/src/common/config/Makefile.am +++ b/src/common/config/Makefile.am @@ -2,7 +2,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src noinst_LTLIBRARIES = libconfig.la -libconfig_la_SOURCES = ini.c ini.h config.c config.h config-session-abi.h config-internal.h +libconfig_la_SOURCES = ini.c ini.h session-config.c session-config.h \ + config-session-abi.h config-internal.h libconfig_la_CPPFLAGS = $(XML_CPPFLAGS) $(AM_CPPFLAGS) libconfig_la_LIBADD = $(XML_LIBS) diff --git a/src/common/config/config.c b/src/common/config/session-config.c similarity index 99% rename from src/common/config/config.c rename to src/common/config/session-config.c index 5e5a8d58e..87e9c03c8 100644 --- a/src/common/config/config.c +++ b/src/common/config/session-config.c @@ -40,7 +40,7 @@ #include #include -#include "config.h" +#include "session-config.h" #include "config-internal.h" struct handler_filter_args { diff --git a/src/common/config/config.h b/src/common/config/session-config.h similarity index 100% rename from src/common/config/config.h rename to src/common/config/session-config.h diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c index 10e82115e..f0d074ea7 100644 --- a/src/common/mi-lttng.c +++ b/src/common/mi-lttng.c @@ -17,7 +17,7 @@ */ #define _LGPL_SOURCE -#include +#include #include #include "mi-lttng.h" diff --git a/src/common/mi-lttng.h b/src/common/mi-lttng.h index 55ea68d73..ccf397141 100644 --- a/src/common/mi-lttng.h +++ b/src/common/mi-lttng.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include /* Don't want to reference snapshot-internal.h here */ diff --git a/src/lib/lttng-ctl/load.c b/src/lib/lttng-ctl/load.c index 40a28bcf1..d1faf0269 100644 --- a/src/lib/lttng-ctl/load.c +++ b/src/lib/lttng-ctl/load.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "lttng-ctl-helper.h" diff --git a/tests/unit/ini_config/ini_config.c b/tests/unit/ini_config/ini_config.c index 29935ef1c..e9710275b 100644 --- a/tests/unit/ini_config/ini_config.c +++ b/tests/unit/ini_config/ini_config.c @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include -- 2.34.1