From 831286df3001e6b76b7baeb10a7723841ab8b35e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 9 Mar 2017 13:02:20 +0100 Subject: include: use double-quotes to include our own headers In practice, this should only matter when there are multiple header files with the same name. That is something we try to avoid already, by giving headers a distinct name. When building NetworkManager itself, we clearly want to use double-quotes for including our own headers. But we also want to do that in our public headers. For example: ./a.c #include #include void main() { printf ("INCLUDED %s/nm-2.h\n", SYMB); } ./1/nm-1.h #include ./1/nm-2.h #define SYMB "1" ./2/nm-2.h #define SYMB "2" $ cc -I./2 -I./1 ./a.c $ ./a.out INCLUDED 2/nm-2.h Exceptions to this are - headers in "shared/nm-utils" that include . These headers are copied into projects and hence used like headers owned by those projects. - examples/C --- libnm-glib/nm-access-point.c | 10 +++++----- libnm-glib/nm-access-point.h | 4 ++-- libnm-glib/nm-active-connection.h | 4 ++-- libnm-glib/nm-client.h | 2 +- libnm-glib/nm-object.h | 2 +- libnm-glib/nm-remote-connection.h | 2 +- libnm-glib/nm-remote-settings.h | 4 ++-- libnm-glib/nm-secret-agent.h | 2 +- libnm-glib/nm-types.h | 2 +- libnm-glib/nm-vpn-plugin-ui-interface.h | 2 +- libnm-glib/nm-vpn-plugin-utils.h | 2 +- libnm-glib/nm-vpn-plugin.h | 4 ++-- libnm-glib/nm-wimax-nsp.h | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) (limited to 'libnm-glib') diff --git a/libnm-glib/nm-access-point.c b/libnm-glib/nm-access-point.c index 0aef3ee400..892b4a8309 100644 --- a/libnm-glib/nm-access-point.c +++ b/libnm-glib/nm-access-point.c @@ -24,11 +24,11 @@ #include #include -#include -#include -#include -#include -#include +#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-access-point.h" #include "NetworkManager.h" diff --git a/libnm-glib/nm-access-point.h b/libnm-glib/nm-access-point.h index 7ea8f8120a..5750c76c53 100644 --- a/libnm-glib/nm-access-point.h +++ b/libnm-glib/nm-access-point.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include "NetworkManager.h" +#include "nm-connection.h" #include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-active-connection.h b/libnm-glib/nm-active-connection.h index e29415649c..cdf02a94e8 100644 --- a/libnm-glib/nm-active-connection.h +++ b/libnm-glib/nm-active-connection.h @@ -25,8 +25,8 @@ #include #include #include "nm-object.h" -#include -#include +#include "nm-connection.h" +#include "NetworkManager.h" #include "nm-ip4-config.h" #include "nm-dhcp4-config.h" #include "nm-ip6-config.h" diff --git a/libnm-glib/nm-client.h b/libnm-glib/nm-client.h index f10b6e54b4..fbbc3d92f5 100644 --- a/libnm-glib/nm-client.h +++ b/libnm-glib/nm-client.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include "NetworkManager.h" #include "nm-object.h" #include "nm-device.h" #include "nm-active-connection.h" diff --git a/libnm-glib/nm-object.h b/libnm-glib/nm-object.h index 07348f2491..73aa9de541 100644 --- a/libnm-glib/nm-object.h +++ b/libnm-glib/nm-object.h @@ -26,7 +26,7 @@ #include #include -#include +#include "nm-version.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-remote-connection.h b/libnm-glib/nm-remote-connection.h index 8292c23545..5b746a4450 100644 --- a/libnm-glib/nm-remote-connection.h +++ b/libnm-glib/nm-remote-connection.h @@ -25,7 +25,7 @@ #include #include -#include +#include "nm-connection.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-remote-settings.h b/libnm-glib/nm-remote-settings.h index 92049adee0..af6cc60369 100644 --- a/libnm-glib/nm-remote-settings.h +++ b/libnm-glib/nm-remote-settings.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include "nm-connection.h" +#include "nm-remote-connection.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-secret-agent.h b/libnm-glib/nm-secret-agent.h index b7df874531..621e5e7bf9 100644 --- a/libnm-glib/nm-secret-agent.h +++ b/libnm-glib/nm-secret-agent.h @@ -21,7 +21,7 @@ #ifndef NM_SECRET_AGENT_H #define NM_SECRET_AGENT_H -#include +#include "nm-connection.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-types.h b/libnm-glib/nm-types.h index 81bd299e69..9b58cd81e9 100644 --- a/libnm-glib/nm-types.h +++ b/libnm-glib/nm-types.h @@ -24,7 +24,7 @@ #include #include -#include +#include "nm-glib-enum-types.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-vpn-plugin-ui-interface.h b/libnm-glib/nm-vpn-plugin-ui-interface.h index 37fde91f8c..b5ea2a7ef2 100644 --- a/libnm-glib/nm-vpn-plugin-ui-interface.h +++ b/libnm-glib/nm-vpn-plugin-ui-interface.h @@ -24,7 +24,7 @@ #include #include -#include +#include "nm-connection.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-vpn-plugin-utils.h b/libnm-glib/nm-vpn-plugin-utils.h index d87ef16aa4..dfb621cad4 100644 --- a/libnm-glib/nm-vpn-plugin-utils.h +++ b/libnm-glib/nm-vpn-plugin-utils.h @@ -22,7 +22,7 @@ #define NM_VPN_PLUGIN_UTILS_H #include -#include +#include "nm-setting.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-vpn-plugin.h b/libnm-glib/nm-vpn-plugin.h index 323017f035..a33349a195 100644 --- a/libnm-glib/nm-vpn-plugin.h +++ b/libnm-glib/nm-vpn-plugin.h @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include "NetworkManagerVPN.h" +#include "nm-connection.h" G_BEGIN_DECLS diff --git a/libnm-glib/nm-wimax-nsp.h b/libnm-glib/nm-wimax-nsp.h index 74008d18e0..336f331dd5 100644 --- a/libnm-glib/nm-wimax-nsp.h +++ b/libnm-glib/nm-wimax-nsp.h @@ -24,7 +24,7 @@ #include #include -#include +#include "NetworkManager.h" #include "nm-object.h" G_BEGIN_DECLS -- cgit v1.2.1