summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-19 14:57:48 +0100
committerThomas Haller <thaller@redhat.com>2016-02-19 17:53:25 +0100
commit8bace23bebcc28396460663203d54aac4ec8ffbf (patch)
tree1655434d48980dbb4a547f6d56a231252aa0181d /libnm
parent89d6fa6aa93cdc982992c137f0b694cd339c315c (diff)
downloadNetworkManager-8bace23bebcc28396460663203d54aac4ec8ffbf.tar.gz
all: cleanup includes and let "nm-default.h" include "config.h"
- All internal source files (except "examples", which are not internal) should include "config.h" first. As also all internal source files should include "nm-default.h", let "config.h" be included by "nm-default.h" and include "nm-default.h" as first in every source file. We already wanted to include "nm-default.h" before other headers because it might contains some fixes (like "nm-glib.h" compatibility) that is required first. - After including "nm-default.h", we optinally allow for including the corresponding header file for the source file at hand. The idea is to ensure that each header file is self contained. - Don't include "config.h" or "nm-default.h" in any header file (except "nm-sd-adapt.h"). Public headers anyway must not include these headers, and internal headers are never included after "nm-default.h", as of the first previous point. - Include all internal headers with quotes instead of angle brackets. In practice it doesn't matter, because in our public headers we must include other headers with angle brackets. As we use our public headers also to compile our interal source files, effectively the result must be the same. Still do it for consistency. - Except for <config.h> itself. Include it with angle brackets as suggested by https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-access-point.c3
-rw-r--r--libnm/nm-active-connection.c3
-rw-r--r--libnm/nm-client.c5
-rw-r--r--libnm/nm-dbus-helpers.c3
-rw-r--r--libnm/nm-device-adsl.c6
-rw-r--r--libnm/nm-device-bond.c9
-rw-r--r--libnm/nm-device-bridge.c9
-rw-r--r--libnm/nm-device-bt.c9
-rw-r--r--libnm/nm-device-ethernet.c11
-rw-r--r--libnm/nm-device-generic.c2
-rw-r--r--libnm/nm-device-infiniband.c9
-rw-r--r--libnm/nm-device-ip-tunnel.c9
-rw-r--r--libnm/nm-device-macvlan.c11
-rw-r--r--libnm/nm-device-modem.c9
-rw-r--r--libnm/nm-device-olpc-mesh.c7
-rw-r--r--libnm/nm-device-team.c9
-rw-r--r--libnm/nm-device-tun.c9
-rw-r--r--libnm/nm-device-vlan.c11
-rw-r--r--libnm/nm-device-vxlan.c9
-rw-r--r--libnm/nm-device-wifi.c3
-rw-r--r--libnm/nm-device-wimax.c9
-rw-r--r--libnm/nm-device.c3
-rw-r--r--libnm/nm-dhcp-config.c2
-rw-r--r--libnm/nm-dhcp4-config.c2
-rw-r--r--libnm/nm-dhcp6-config.c2
-rw-r--r--libnm/nm-ip-config.c2
-rw-r--r--libnm/nm-ip4-config.c2
-rw-r--r--libnm/nm-ip6-config.c2
-rw-r--r--libnm/nm-manager.c3
-rw-r--r--libnm/nm-object-cache.c4
-rw-r--r--libnm/nm-object.c3
-rw-r--r--libnm/nm-remote-connection.c10
-rw-r--r--libnm/nm-remote-settings.c3
-rw-r--r--libnm/nm-secret-agent-old.c3
-rw-r--r--libnm/nm-vpn-connection.c3
-rw-r--r--libnm/nm-vpn-editor.c2
-rw-r--r--libnm/nm-vpn-plugin-old.c3
-rw-r--r--libnm/nm-vpn-service-plugin.c3
-rw-r--r--libnm/nm-wimax-nsp.c9
-rw-r--r--libnm/tests/test-nm-client.c2
-rw-r--r--libnm/tests/test-remote-settings-client.c2
-rw-r--r--libnm/tests/test-secret-agent.c4
42 files changed, 100 insertions, 124 deletions
diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c
index a15190c7da..d1dd1c3fdd 100644
--- a/libnm/nm-access-point.c
+++ b/libnm/nm-access-point.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2011 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-access-point.h"
#include <string.h>
diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c
index b16080278a..a1636598ac 100644
--- a/libnm/nm-active-connection.c
+++ b/libnm/nm-active-connection.c
@@ -19,11 +19,10 @@
* Copyright 2008 Novell, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include "nm-default.h"
#include "nm-dbus-interface.h"
#include "nm-active-connection.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index dc6db0aad9..57a43ca8dc 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -19,12 +19,11 @@
* Copyright 2007 - 2014 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-utils.h>
-#include "nm-default.h"
+#include "nm-utils.h"
#include "nm-client.h"
#include "nm-manager.h"
#include "nm-remote-settings.h"
diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c
index 6242bb2717..3076674a4f 100644
--- a/libnm/nm-dbus-helpers.c
+++ b/libnm/nm-dbus-helpers.c
@@ -18,9 +18,8 @@
* Copyright 2013 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-dbus-helpers.h"
#include <string.h>
diff --git a/libnm/nm-device-adsl.c b/libnm/nm-device-adsl.c
index b9d609dab5..7608ff3916 100644
--- a/libnm/nm-device-adsl.c
+++ b/libnm/nm-device-adsl.c
@@ -19,16 +19,18 @@
* Copyright 2009 - 2011 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nm-device-adsl.h"
+
+#include <string.h>
+
#include "nm-device-private.h"
#include "nm-object-private.h"
#include "nm-setting-adsl.h"
#include "nm-setting-connection.h"
-#include <string.h>
G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE)
diff --git a/libnm/nm-device-bond.c b/libnm/nm-device-bond.c
index 3bfcb94cea..483d9d009b 100644
--- a/libnm/nm-device-bond.c
+++ b/libnm/nm-device-bond.c
@@ -18,15 +18,14 @@
* Copyright 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-bond.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-bond.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-bond.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-bridge.c b/libnm/nm-device-bridge.c
index 5afc46e3ed..c6bf135997 100644
--- a/libnm/nm-device-bridge.c
+++ b/libnm/nm-device-bridge.c
@@ -18,15 +18,14 @@
* Copyright 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-bridge.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-bridge.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-bridge.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-bt.c b/libnm/nm-device-bt.c
index f89be17221..dc28ad89f4 100644
--- a/libnm/nm-device-bt.c
+++ b/libnm/nm-device-bt.c
@@ -19,15 +19,14 @@
* Copyright 2007 - 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-bluetooth.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-bt.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c
index 537a6f4cac..88a7c43248 100644
--- a/libnm/nm-device-ethernet.c
+++ b/libnm/nm-device-ethernet.c
@@ -19,16 +19,15 @@
* Copyright 2007 - 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-pppoe.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-wired.h"
+#include "nm-setting-pppoe.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-ethernet.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-generic.c b/libnm/nm-device-generic.c
index 9aeb9bfafb..069ca0eafa 100644
--- a/libnm/nm-device-generic.c
+++ b/libnm/nm-device-generic.c
@@ -18,7 +18,7 @@
* Copyright 2013 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/libnm/nm-device-infiniband.c b/libnm/nm-device-infiniband.c
index ab3a0bb75d..6770b1c53e 100644
--- a/libnm/nm-device-infiniband.c
+++ b/libnm/nm-device-infiniband.c
@@ -18,15 +18,14 @@
* Copyright 2011 - 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-infiniband.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-infiniband.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-infiniband.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-ip-tunnel.c b/libnm/nm-device-ip-tunnel.c
index b43b041290..f5b3cad6a3 100644
--- a/libnm/nm-device-ip-tunnel.c
+++ b/libnm/nm-device-ip-tunnel.c
@@ -18,15 +18,14 @@
* Copyright 2015 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-ip-tunnel.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-ip-tunnel.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-ip-tunnel.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-macvlan.c b/libnm/nm-device-macvlan.c
index 3b4bfd35c8..825c9197c1 100644
--- a/libnm/nm-device-macvlan.c
+++ b/libnm/nm-device-macvlan.c
@@ -18,16 +18,15 @@
* Copyright 2015 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-macvlan.h>
-#include <nm-setting-wired.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-macvlan.h"
+#include "nm-setting-wired.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-macvlan.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-modem.c b/libnm/nm-device-modem.c
index 9fe5acb650..d442dc0342 100644
--- a/libnm/nm-device-modem.c
+++ b/libnm/nm-device-modem.c
@@ -19,15 +19,14 @@
* Copyright 2008 Novell, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-cdma.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-gsm.h"
+#include "nm-setting-cdma.h"
-#include "nm-default.h"
#include "nm-device-modem.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-olpc-mesh.c b/libnm/nm-device-olpc-mesh.c
index 8e6cb1ab24..984ea4e42d 100644
--- a/libnm/nm-device-olpc-mesh.c
+++ b/libnm/nm-device-olpc-mesh.c
@@ -18,14 +18,13 @@
* Copyright 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-olpc-mesh.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-olpc-mesh.h"
-#include "nm-default.h"
#include "nm-device-olpc-mesh.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-team.c b/libnm/nm-device-team.c
index c38c58c1fd..b855d5ec38 100644
--- a/libnm/nm-device-team.c
+++ b/libnm/nm-device-team.c
@@ -18,15 +18,14 @@
* Copyright 2013 Jiri Pirko <jiri@resnulli.us>
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-team.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-team.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-team.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-tun.c b/libnm/nm-device-tun.c
index ce2558f0a9..b227f5b13e 100644
--- a/libnm/nm-device-tun.c
+++ b/libnm/nm-device-tun.c
@@ -18,16 +18,15 @@
* Copyright 2015 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
#include <arpa/inet.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-tun.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-tun.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-tun.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-vlan.c b/libnm/nm-device-vlan.c
index b285eea9c6..843dda02df 100644
--- a/libnm/nm-device-vlan.c
+++ b/libnm/nm-device-vlan.c
@@ -18,16 +18,15 @@
* Copyright 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-vlan.h>
-#include <nm-setting-wired.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-vlan.h"
+#include "nm-setting-wired.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-vlan.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-vxlan.c b/libnm/nm-device-vxlan.c
index 4718080e4a..335498ee4a 100644
--- a/libnm/nm-device-vxlan.c
+++ b/libnm/nm-device-vxlan.c
@@ -18,15 +18,14 @@
* Copyright 2015 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-vxlan.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-vxlan.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-vxlan.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c
index 4d3545c8bd..3fde324c05 100644
--- a/libnm/nm-device-wifi.c
+++ b/libnm/nm-device-wifi.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2014 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-device-wifi.h"
#include <string.h>
diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c
index 55658a590e..e26efedbae 100644
--- a/libnm/nm-device-wimax.c
+++ b/libnm/nm-device-wimax.c
@@ -19,15 +19,14 @@
* Copyright 2009 Novell, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wimax.h>
-#include <nm-utils.h>
+#include "nm-setting-connection.h"
+#include "nm-setting-wimax.h"
+#include "nm-utils.h"
-#include "nm-default.h"
#include "nm-device-wimax.h"
#include "nm-wimax-nsp.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 3e887f79ea..5545e8be31 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2012 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-device.h"
#include <string.h>
diff --git a/libnm/nm-dhcp-config.c b/libnm/nm-dhcp-config.c
index 7227abac33..3161e2960f 100644
--- a/libnm/nm-dhcp-config.c
+++ b/libnm/nm-dhcp-config.c
@@ -19,7 +19,7 @@
* Copyright 2008 Novell, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/libnm/nm-dhcp4-config.c b/libnm/nm-dhcp4-config.c
index 808edaa647..26e89c2766 100644
--- a/libnm/nm-dhcp4-config.c
+++ b/libnm/nm-dhcp4-config.c
@@ -18,7 +18,7 @@
* Copyright 2014 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nm-dhcp4-config.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-dhcp6-config.c b/libnm/nm-dhcp6-config.c
index 3b2e81f84c..f1556b208b 100644
--- a/libnm/nm-dhcp6-config.c
+++ b/libnm/nm-dhcp6-config.c
@@ -18,7 +18,7 @@
* Copyright 2014 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nm-dhcp6-config.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-ip-config.c b/libnm/nm-ip-config.c
index fc4567c420..97fb0aa926 100644
--- a/libnm/nm-ip-config.c
+++ b/libnm/nm-ip-config.c
@@ -19,7 +19,7 @@
* Copyright 2008 - 2014 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/libnm/nm-ip4-config.c b/libnm/nm-ip4-config.c
index 26797dd7ca..a57fc30f5c 100644
--- a/libnm/nm-ip4-config.c
+++ b/libnm/nm-ip4-config.c
@@ -18,7 +18,7 @@
* Copyright 2014 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nm-ip4-config.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-ip6-config.c b/libnm/nm-ip6-config.c
index 8a6c966c39..983c0465fa 100644
--- a/libnm/nm-ip6-config.c
+++ b/libnm/nm-ip6-config.c
@@ -18,7 +18,7 @@
* Copyright 2014 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nm-ip6-config.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
index 775f7d71c3..17a51f249b 100644
--- a/libnm/nm-manager.c
+++ b/libnm/nm-manager.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2014 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-manager.h"
#include <string.h>
diff --git a/libnm/nm-object-cache.c b/libnm/nm-object-cache.c
index 82af1140f1..fa56ace53b 100644
--- a/libnm/nm-object-cache.c
+++ b/libnm/nm-object-cache.c
@@ -18,10 +18,10 @@
* Copyright 2008 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include "nm-default.h"
+
#include "nm-object-cache.h"
#include "nm-object.h"
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index 42c6476e94..b35f6822a5 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2012 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-object.h"
#include <string.h>
diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c
index e2073784ca..d2b55bd84f 100644
--- a/libnm/nm-remote-connection.c
+++ b/libnm/nm-remote-connection.c
@@ -19,14 +19,14 @@
* Copyright 2007 - 2011 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-dbus-interface.h>
-#include <nm-utils.h>
-#include <nm-setting-connection.h>
-#include "nm-default.h"
+#include "nm-dbus-interface.h"
+#include "nm-utils.h"
+#include "nm-setting-connection.h"
+
#include "nm-remote-connection.h"
#include "nm-remote-connection-private.h"
#include "nm-object-private.h"
diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c
index 305985b175..b04f4f2ac8 100644
--- a/libnm/nm-remote-settings.c
+++ b/libnm/nm-remote-settings.c
@@ -19,9 +19,8 @@
* Copyright 2009 - 2012 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-remote-settings.h"
#include <string.h>
diff --git a/libnm/nm-secret-agent-old.c b/libnm/nm-secret-agent-old.c
index 97bb287e8c..8edb224cb1 100644
--- a/libnm/nm-secret-agent-old.c
+++ b/libnm/nm-secret-agent-old.c
@@ -18,11 +18,10 @@
* Copyright 2010 - 2011 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include "nm-default.h"
#include "nm-dbus-interface.h"
#include "nm-secret-agent-old.h"
#include "nm-enum-types.h"
diff --git a/libnm/nm-vpn-connection.c b/libnm/nm-vpn-connection.c
index f46dc0ca08..4b96210b46 100644
--- a/libnm/nm-vpn-connection.c
+++ b/libnm/nm-vpn-connection.c
@@ -19,9 +19,10 @@
* Copyright 2007 - 2012 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
+
#include "nm-vpn-connection.h"
#include "nm-dbus-interface.h"
#include "nm-utils.h"
diff --git a/libnm/nm-vpn-editor.c b/libnm/nm-vpn-editor.c
index da81d605ea..86bd694736 100644
--- a/libnm/nm-vpn-editor.c
+++ b/libnm/nm-vpn-editor.c
@@ -19,7 +19,7 @@
* Copyright 2008 Novell, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nm-vpn-editor.h"
diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c
index c14f3a7aae..9bbac414c1 100644
--- a/libnm/nm-vpn-plugin-old.c
+++ b/libnm/nm-vpn-plugin-old.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2008 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-vpn-plugin-old.h"
#include <errno.h>
diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c
index c9e3a0c4c7..4e301e91c9 100644
--- a/libnm/nm-vpn-service-plugin.c
+++ b/libnm/nm-vpn-service-plugin.c
@@ -19,9 +19,8 @@
* Copyright 2007 - 2015 Red Hat, Inc.
*/
-#include "config.h"
-
#include "nm-default.h"
+
#include "nm-vpn-service-plugin.h"
#include <errno.h>
diff --git a/libnm/nm-wimax-nsp.c b/libnm/nm-wimax-nsp.c
index 9fbc6ea1d3..d544b0d47f 100644
--- a/libnm/nm-wimax-nsp.c
+++ b/libnm/nm-wimax-nsp.c
@@ -18,15 +18,14 @@
* Copyright 2011 Red Hat, Inc.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wimax.h>
+#include "nm-connection.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-wimax.h"
-#include "nm-default.h"
#include "nm-wimax-nsp.h"
#include "nm-dbus-interface.h"
#include "nm-object-private.h"
diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c
index 70e93acc23..9e9d480eaf 100644
--- a/libnm/tests/test-nm-client.c
+++ b/libnm/tests/test-nm-client.c
@@ -18,7 +18,7 @@
*
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
#include <sys/types.h>
diff --git a/libnm/tests/test-remote-settings-client.c b/libnm/tests/test-remote-settings-client.c
index 1a3c7988a2..8f59656d75 100644
--- a/libnm/tests/test-remote-settings-client.c
+++ b/libnm/tests/test-remote-settings-client.c
@@ -18,7 +18,7 @@
*
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
#include <sys/types.h>
diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c
index f8aedd2368..9756186681 100644
--- a/libnm/tests/test-secret-agent.c
+++ b/libnm/tests/test-secret-agent.c
@@ -18,13 +18,13 @@
*
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
#include <sys/types.h>
#include <signal.h>
-#include <nm-secret-agent-old.h>
+#include "nm-secret-agent-old.h"
#include "nm-test-libnm-utils.h"