summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-12 14:44:52 +0100
committerThomas Haller <thaller@redhat.com>2016-02-12 15:36:01 +0100
commit2c2d9d2e4cca422a53968cdcb6def420dd77961e (patch)
tree3c05e45abdd2e3442f4b18123a1818b03c999871 /libnm
parent97be12b6625e738856814403195b60f7ebc13bfe (diff)
downloadNetworkManager-2c2d9d2e4cca422a53968cdcb6def420dd77961e.tar.gz
build: cleanup default includes
- "gsystem-local-alloc.h" and <gio/gio.h> are already included via "nm-default.h". No need to include them separately. - include "nm-macros-internal.h" via "nm-default.h" and drop all explict includes. - in the modified files, ensure that we always include "config.h" and "nm-default.h" first. As second, include the header file for the current source file (if applicable). Then follow external includes and finally internal nm includes. - include nm headers inside source code files with quotes - internal header files don't need to include default headers. They can savely assume that "nm-default.h" is already included and with it glib, nm-glib.h, nm-macros-internal.h, etc.
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-access-point.c16
-rw-r--r--libnm/nm-dbus-helpers.c6
-rw-r--r--libnm/nm-device-wifi.c14
-rw-r--r--libnm/nm-device.c7
-rw-r--r--libnm/nm-manager.c8
-rw-r--r--libnm/nm-object.c9
-rw-r--r--libnm/nm-remote-settings.c11
-rw-r--r--libnm/nm-vpn-plugin-old.c6
-rw-r--r--libnm/nm-vpn-service-plugin.c3
9 files changed, 40 insertions, 40 deletions
diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c
index 852b280856..a15190c7da 100644
--- a/libnm/nm-access-point.c
+++ b/libnm/nm-access-point.c
@@ -21,19 +21,19 @@
#include "config.h"
+#include "nm-default.h"
+#include "nm-access-point.h"
+
#include <string.h>
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-utils.h>
+#include "nm-connection.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-wireless.h"
+#include "nm-setting-wireless-security.h"
+#include "nm-utils.h"
-#include "nm-default.h"
-#include "nm-access-point.h"
#include "nm-dbus-interface.h"
#include "nm-object-private.h"
-#include "nm-macros-internal.h"
G_DEFINE_TYPE (NMAccessPoint, nm_access_point, NM_TYPE_OBJECT)
diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c
index 3c0393752d..6242bb2717 100644
--- a/libnm/nm-dbus-helpers.c
+++ b/libnm/nm-dbus-helpers.c
@@ -20,12 +20,12 @@
#include "config.h"
-#include <string.h>
-
#include "nm-default.h"
#include "nm-dbus-helpers.h"
+
+#include <string.h>
+
#include "nm-dbus-interface.h"
-#include "nm-macros-internal.h"
static GBusType nm_bus = G_BUS_TYPE_SYSTEM;
diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c
index 9019e0384d..4d3545c8bd 100644
--- a/libnm/nm-device-wifi.c
+++ b/libnm/nm-device-wifi.c
@@ -21,22 +21,22 @@
#include "config.h"
+#include "nm-default.h"
+#include "nm-device-wifi.h"
+
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-wireless.h"
+#include "nm-setting-wireless-security.h"
+#include "nm-utils.h"
-#include "nm-default.h"
-#include "nm-device-wifi.h"
#include "nm-access-point.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
#include "nm-object-cache.h"
#include "nm-core-internal.h"
#include "nm-dbus-helpers.h"
-#include "nm-macros-internal.h"
#include "nmdbus-device-wifi.h"
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 7d57b52699..49e1e5f7e9 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -21,11 +21,12 @@
#include "config.h"
-#include <string.h>
+#include "nm-default.h"
+#include "nm-device.h"
+#include <string.h>
#include <gudev/gudev.h>
-#include "nm-default.h"
#include "nm-dbus-interface.h"
#include "nm-active-connection.h"
#include "nm-device-ethernet.h"
@@ -44,7 +45,6 @@
#include "nm-device-generic.h"
#include "nm-device-ip-tunnel.h"
#include "nm-device-macvlan.h"
-#include "nm-device.h"
#include "nm-device-private.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
@@ -58,7 +58,6 @@
#include "nm-dbus-helpers.h"
#include "nm-device-tun.h"
#include "nm-setting-connection.h"
-#include "nm-macros-internal.h"
#include "nmdbus-device.h"
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
index b4b7e0c7f2..775f7d71c3 100644
--- a/libnm/nm-manager.c
+++ b/libnm/nm-manager.c
@@ -21,11 +21,12 @@
#include "config.h"
-#include <string.h>
-#include <nm-utils.h>
-
#include "nm-default.h"
#include "nm-manager.h"
+
+#include <string.h>
+
+#include "nm-utils.h"
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
#include "nm-device-private.h"
@@ -35,7 +36,6 @@
#include "nm-vpn-connection.h"
#include "nm-object-cache.h"
#include "nm-dbus-helpers.h"
-#include "nm-macros-internal.h"
#include "nmdbus-manager.h"
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index 143931f1b1..42c6476e94 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -21,19 +21,20 @@
#include "config.h"
+#include "nm-default.h"
+#include "nm-object.h"
+
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include <nm-utils.h>
-#include "nm-default.h"
+
+#include "nm-utils.h"
#include "nm-dbus-interface.h"
-#include "nm-object.h"
#include "nm-object-cache.h"
#include "nm-object-private.h"
#include "nm-dbus-helpers.h"
#include "nm-client.h"
#include "nm-core-internal.h"
-#include "nm-macros-internal.h"
static gboolean debug = FALSE;
#define dbgmsg(f,...) if (G_UNLIKELY (debug)) { g_message (f, ## __VA_ARGS__ ); }
diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c
index 480d7c19f5..305985b175 100644
--- a/libnm/nm-remote-settings.c
+++ b/libnm/nm-remote-settings.c
@@ -21,12 +21,14 @@
#include "config.h"
-#include <string.h>
-#include <nm-dbus-interface.h>
-#include <nm-connection.h>
-
#include "nm-default.h"
#include "nm-remote-settings.h"
+
+#include <string.h>
+
+#include "nm-dbus-interface.h"
+#include "nm-connection.h"
+
#include "nm-client.h"
#include "nm-remote-connection.h"
#include "nm-remote-connection-private.h"
@@ -34,7 +36,6 @@
#include "nm-dbus-helpers.h"
#include "nm-object-private.h"
#include "nm-core-internal.h"
-#include "nm-macros-internal.h"
#include "nmdbus-settings.h"
diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c
index 4854b66afa..c14f3a7aae 100644
--- a/libnm/nm-vpn-plugin-old.c
+++ b/libnm/nm-vpn-plugin-old.c
@@ -21,19 +21,19 @@
#include "config.h"
+#include "nm-default.h"
+#include "nm-vpn-plugin-old.h"
+
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
-#include "nm-default.h"
-#include "nm-vpn-plugin-old.h"
#include "nm-enum-types.h"
#include "nm-utils.h"
#include "nm-connection.h"
#include "nm-dbus-helpers.h"
#include "nm-core-internal.h"
#include "nm-simple-connection.h"
-#include "nm-macros-internal.h"
#include "nmdbus-vpn-plugin.h"
diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c
index 0de3805174..c9e3a0c4c7 100644
--- a/libnm/nm-vpn-service-plugin.c
+++ b/libnm/nm-vpn-service-plugin.c
@@ -21,20 +21,19 @@
#include "config.h"
+#include "nm-default.h"
#include "nm-vpn-service-plugin.h"
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
-#include "nm-glib.h"
#include "nm-enum-types.h"
#include "nm-utils.h"
#include "nm-connection.h"
#include "nm-dbus-helpers.h"
#include "nm-core-internal.h"
#include "nm-simple-connection.h"
-#include "nm-macros-internal.h"
#include "nmdbus-vpn-plugin.h"