summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@freedesktop.org>2013-01-09 13:43:49 +0100
committerDebarshi Ray <debarshir@freedesktop.org>2013-01-09 15:28:21 +0100
commit33531660b4d5c6bb1450ac80686e75012a06a7eb (patch)
tree9daa4d67e9453d118837cb34faaef1bf85b74416
parentfb8c6f057b102b854e608cc48f3a08cf2daa59f8 (diff)
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
-rw-r--r--extensions/extensions.c2
-rw-r--r--src/test-api.c2
-rw-r--r--telepathy-logger/util.c2
-rw-r--r--tests/dbus/test-log-manager.c2
-rw-r--r--tests/dbus/test-tpl-log-iter-pidgin.c3
-rw-r--r--tests/dbus/test-tpl-log-iter-xml.c3
-rw-r--r--tests/dbus/test-tpl-log-store-pidgin.c2
-rw-r--r--tests/dbus/test-tpl-log-store-xml.c2
-rw-r--r--tests/dbus/test-tpl-log-walker.c3
-rw-r--r--tests/dbus/test-tpl-observer.c2
-rw-r--r--tests/lib/simple-account-manager.c2
-rw-r--r--tests/lib/simple-account.c2
-rw-r--r--tests/test-tpl-conf.c2
13 files changed, 29 insertions, 0 deletions
diff --git a/extensions/extensions.c b/extensions/extensions.c
index a47e0e121..0f850428d 100644
--- a/extensions/extensions.c
+++ b/extensions/extensions.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include "extensions.h"
#include <telepathy-glib/proxy-subclass.h>
diff --git a/src/test-api.c b/src/test-api.c
index 1f8f6cfd7..4a2acaa7c 100644
--- a/src/test-api.c
+++ b/src/test-api.c
@@ -19,6 +19,8 @@
*/
+#include "config.h"
+
#include <glib.h>
#include <telepathy-glib/telepathy-glib.h>
diff --git a/telepathy-logger/util.c b/telepathy-logger/util.c
index ba1470444..fd871bf9b 100644
--- a/telepathy-logger/util.c
+++ b/telepathy-logger/util.c
@@ -20,6 +20,8 @@
* Richard Hult <richard@imendio.com>
*/
+#include "config.h"
+
#include "util-internal.h"
#include <errno.h>
diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c
index c3a91a645..3137931c1 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 e1a96dc55..059b32b0d 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 7b966f654..b01a32203 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 fea3daff7..a15a87dd4 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 6deceb9ab..35e31785f 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 1ef28ddfd..b26eb8f6e 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 aef7ad397..b1c687dce 100644
--- a/tests/dbus/test-tpl-observer.c
+++ b/tests/dbus/test-tpl-observer.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <telepathy-logger/observer-internal.h>
int
diff --git a/tests/lib/simple-account-manager.c b/tests/lib/simple-account-manager.c
index e1d1611f2..33e70f63e 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 <telepathy-glib/gtypes.h>
diff --git a/tests/lib/simple-account.c b/tests/lib/simple-account.c
index 8b25af216..6761c0646 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 <telepathy-glib/dbus.h>
diff --git a/tests/test-tpl-conf.c b/tests/test-tpl-conf.c
index 08c00a9f7..57363560f 100644
--- a/tests/test-tpl-conf.c
+++ b/tests/test-tpl-conf.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include <telepathy-logger/conf-internal.h>
int