From 33531660b4d5c6bb1450ac80686e75012a06a7eb Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 9 Jan 2013 13:43:49 +0100 Subject: Include config.h as the first thing in every .c file This is Autoconf best-practice, and ensures that the GLib and Telepathy version-selection macros defined by configure.ac work as intended. Including config.h turns on ENABLE_DEBUG, which in turn leads to the usage of _tpl_debug_set_flags_from_env. In those cases we should include telepathy-logger/debug-internal.h also. Fixes: https://bugs.freedesktop.org/59165 --- extensions/extensions.c | 2 ++ src/test-api.c | 2 ++ telepathy-logger/util.c | 2 ++ tests/dbus/test-log-manager.c | 2 ++ tests/dbus/test-tpl-log-iter-pidgin.c | 3 +++ tests/dbus/test-tpl-log-iter-xml.c | 3 +++ tests/dbus/test-tpl-log-store-pidgin.c | 2 ++ tests/dbus/test-tpl-log-store-xml.c | 2 ++ tests/dbus/test-tpl-log-walker.c | 3 +++ tests/dbus/test-tpl-observer.c | 2 ++ tests/lib/simple-account-manager.c | 2 ++ tests/lib/simple-account.c | 2 ++ tests/test-tpl-conf.c | 2 ++ 13 files changed, 29 insertions(+) diff --git a/extensions/extensions.c b/extensions/extensions.c index a47e0e1..0f85042 100644 --- a/extensions/extensions.c +++ b/extensions/extensions.c @@ -1,3 +1,5 @@ +#include "config.h" + #include "extensions.h" #include diff --git a/src/test-api.c b/src/test-api.c index 1f8f6cf..4a2acaa 100644 --- a/src/test-api.c +++ b/src/test-api.c @@ -19,6 +19,8 @@ */ +#include "config.h" + #include #include diff --git a/telepathy-logger/util.c b/telepathy-logger/util.c index ba14704..fd871bf 100644 --- a/telepathy-logger/util.c +++ b/telepathy-logger/util.c @@ -20,6 +20,8 @@ * Richard Hult */ +#include "config.h" + #include "util-internal.h" #include diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c index c3a91a6..3137931 100644 --- a/tests/dbus/test-log-manager.c +++ b/tests/dbus/test-log-manager.c @@ -1,3 +1,5 @@ +#include "config.h" + #include "telepathy-logger/log-manager.c" #include "lib/util.h" diff --git a/tests/dbus/test-tpl-log-iter-pidgin.c b/tests/dbus/test-tpl-log-iter-pidgin.c index e1a96dc..059b32b 100644 --- a/tests/dbus/test-tpl-log-iter-pidgin.c +++ b/tests/dbus/test-tpl-log-iter-pidgin.c @@ -1,6 +1,9 @@ +#include "config.h" + #include "lib/simple-account.h" #include "lib/util.h" +#include "telepathy-logger/debug-internal.h" #include "telepathy-logger/log-iter-internal.h" #include "telepathy-logger/log-iter-pidgin-internal.h" #include "telepathy-logger/log-store-pidgin-internal.h" diff --git a/tests/dbus/test-tpl-log-iter-xml.c b/tests/dbus/test-tpl-log-iter-xml.c index 7b966f6..b01a322 100644 --- a/tests/dbus/test-tpl-log-iter-xml.c +++ b/tests/dbus/test-tpl-log-iter-xml.c @@ -1,6 +1,9 @@ +#include "config.h" + #include "lib/util.h" #include "telepathy-logger/call-event.h" +#include "telepathy-logger/debug-internal.h" #include "telepathy-logger/log-iter-internal.h" #include "telepathy-logger/log-iter-xml-internal.h" #include "telepathy-logger/log-store-xml-internal.h" diff --git a/tests/dbus/test-tpl-log-store-pidgin.c b/tests/dbus/test-tpl-log-store-pidgin.c index fea3daf..a15a87d 100644 --- a/tests/dbus/test-tpl-log-store-pidgin.c +++ b/tests/dbus/test-tpl-log-store-pidgin.c @@ -1,3 +1,5 @@ +#include "config.h" + /* FIXME: hugly kludge: we need to include all the declarations which are used * by the GInterface and thus not in the -internal.h */ #include "telepathy-logger/log-store-pidgin.c" diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c index 6deceb9..35e3178 100644 --- a/tests/dbus/test-tpl-log-store-xml.c +++ b/tests/dbus/test-tpl-log-store-xml.c @@ -1,3 +1,5 @@ +#include "config.h" + #include "telepathy-logger/log-store-xml.c" #include "lib/util.h" diff --git a/tests/dbus/test-tpl-log-walker.c b/tests/dbus/test-tpl-log-walker.c index 1ef28dd..b26eb8f 100644 --- a/tests/dbus/test-tpl-log-walker.c +++ b/tests/dbus/test-tpl-log-walker.c @@ -1,7 +1,10 @@ +#include "config.h" + #include "lib/simple-account.h" #include "lib/util.h" #include "telepathy-logger/call-event.h" +#include "telepathy-logger/debug-internal.h" #include "telepathy-logger/log-manager.h" #include "telepathy-logger/text-event.h" diff --git a/tests/dbus/test-tpl-observer.c b/tests/dbus/test-tpl-observer.c index aef7ad3..b1c687d 100644 --- a/tests/dbus/test-tpl-observer.c +++ b/tests/dbus/test-tpl-observer.c @@ -1,3 +1,5 @@ +#include "config.h" + #include int diff --git a/tests/lib/simple-account-manager.c b/tests/lib/simple-account-manager.c index e1d1611..33e70f6 100644 --- a/tests/lib/simple-account-manager.c +++ b/tests/lib/simple-account-manager.c @@ -9,6 +9,8 @@ * notice and this notice are preserved. */ +#include "config.h" + #include "simple-account-manager.h" #include diff --git a/tests/lib/simple-account.c b/tests/lib/simple-account.c index 8b25af2..6761c06 100644 --- a/tests/lib/simple-account.c +++ b/tests/lib/simple-account.c @@ -8,6 +8,8 @@ * notice and this notice are preserved. */ +#include "config.h" + #include "simple-account.h" #include diff --git a/tests/test-tpl-conf.c b/tests/test-tpl-conf.c index 08c00a9..5736356 100644 --- a/tests/test-tpl-conf.c +++ b/tests/test-tpl-conf.c @@ -1,3 +1,5 @@ +#include "config.h" + #include int -- cgit v1.2.1