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.
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "nm-dhcp-client.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -28,13 +31,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-utils.h"
|
||||
#include "nm-dhcp-client.h"
|
||||
#include "nm-dhcp-utils.h"
|
||||
#include "nm-platform.h"
|
||||
#include "gsystem-local-alloc.h"
|
||||
|
||||
typedef struct {
|
||||
char * iface;
|
||||
|
@@ -19,18 +19,18 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "nm-dhcp-dhclient-utils.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "nm-dhcp-dhclient-utils.h"
|
||||
#include "nm-dhcp-utils.h"
|
||||
#include "nm-ip4-config.h"
|
||||
#include "nm-utils.h"
|
||||
#include "nm-platform.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-macros-internal.h"
|
||||
|
||||
#define CLIENTID_TAG "send dhcp-client-identifier"
|
||||
|
||||
|
@@ -20,18 +20,18 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "nm-default.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-dhcp-dhclient-utils.h"
|
||||
#include "nm-dhcp-utils.h"
|
||||
#include "nm-utils.h"
|
||||
#include "nm-ip4-config.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-macros-internal.h"
|
||||
|
||||
#include "nm-test-utils.h"
|
||||
|
||||
|
Reference in New Issue
Block a user