summaryrefslogtreecommitdiff
path: root/shared
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 /shared
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 'shared')
-rw-r--r--shared/nm-default.h1
-rw-r--r--shared/nm-test-utils.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 045ad8db88..f1fcb845e4 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -44,6 +44,7 @@
#include "nm-glib.h"
#include "nm-version.h"
#include "gsystem-local-alloc.h"
+#include "nm-macros-internal.h"
/*****************************************************************************/
diff --git a/shared/nm-test-utils.h b/shared/nm-test-utils.h
index 66cacb7859..b49e49f461 100644
--- a/shared/nm-test-utils.h
+++ b/shared/nm-test-utils.h
@@ -88,6 +88,8 @@
*
*******************************************************************************/
+#include "nm-default.h"
+
#include <arpa/inet.h>
#include <stdio.h>
#include <unistd.h>
@@ -95,9 +97,7 @@
#include <string.h>
#include <errno.h>
-#include "nm-default.h"
#include "nm-utils.h"
-#include "nm-macros-internal.h"
#ifdef __NETWORKMANAGER_LOGGING_H__
/* We are running tests under src/. Let's include some files by default.