headers: remove unneeded includes from util.h

This means we need to include many more headers in various files that simply
included util.h before, but it seems cleaner to do it this way.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-03-27 11:53:12 +01:00
parent b45556375e
commit ca78ad1de9
160 changed files with 290 additions and 50 deletions
+2
View File
@@ -4,6 +4,8 @@
#include <errno.h>
#include <glob.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "dirent-util.h"
#include "glob-util.h"
+1
View File
@@ -5,6 +5,7 @@
#include <errno.h>
#include <net/if.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "alloc-util.h"
+1
View File
@@ -6,6 +6,7 @@
#include <sys/stat.h>
#include "alloc-util.h"
#include "format-util.h"
#include "fs-util.h"
#include "macro.h"
#include "mkdir.h"
+2
View File
@@ -1,11 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
#include <fcntl.h>
#include <malloc.h>
#include <stddef.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
#include <syslog.h>
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <fcntl.h>
#include <stdbool.h>
#include <stddef.h>
#include <sys/stat.h>
+1 -1
View File
@@ -5,12 +5,12 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include "alloc-util.h"
#include "extract-word.h"
#include "macro.h"
#include "string-util.h"
#include "util.h"
char *strv_find(char **l, const char *name) _pure_;
char *strv_find_prefix(char **l, const char *name) _pure_;
-22
View File
@@ -1,31 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <limits.h>
#include <locale.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/inotify.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include "format-util.h"
#include "macro.h"
#include "time-util.h"
static inline const char* yes_no(bool b) {
return b ? "yes" : "no";