]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: include only what we use 2075/head
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 30 Nov 2015 20:43:37 +0000 (21:43 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 30 Nov 2015 20:51:03 +0000 (21:51 +0100)
This is a cleaned up result of running iwyu but without forward
declarations on src/basic.

128 files changed:
src/basic/af-list.c
src/basic/alloc-util.c
src/basic/alloc-util.h
src/basic/arphrd-list.c
src/basic/async.c
src/basic/audit-util.c
src/basic/barrier.c
src/basic/barrier.h
src/basic/bitmap.c
src/basic/bitmap.h
src/basic/btrfs-util.c
src/basic/btrfs-util.h
src/basic/bus-label.c
src/basic/bus-label.h
src/basic/calendarspec.c
src/basic/calendarspec.h
src/basic/cap-list.c
src/basic/capability-util.c
src/basic/capability-util.h
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/basic/chattr-util.c
src/basic/clock-util.c
src/basic/conf-files.c
src/basic/copy.c
src/basic/copy.h
src/basic/cpu-set-util.c
src/basic/device-nodes.c
src/basic/device-nodes.h
src/basic/dirent-util.c
src/basic/dirent-util.h
src/basic/env-util.c
src/basic/env-util.h
src/basic/errno-list.c
src/basic/escape.c
src/basic/escape.h
src/basic/ether-addr-util.c
src/basic/exit-status.h
src/basic/extract-word.c
src/basic/fd-util.c
src/basic/fdset.c
src/basic/fdset.h
src/basic/fileio-label.c
src/basic/fileio.c
src/basic/fs-util.c
src/basic/fs-util.h
src/basic/glob-util.c
src/basic/glob-util.h
src/basic/gunicode.c
src/basic/hashmap.c
src/basic/hashmap.h
src/basic/hexdecoct.c
src/basic/hexdecoct.h
src/basic/hostname-util.c
src/basic/in-addr-util.c
src/basic/in-addr-util.h
src/basic/io-util.c
src/basic/io-util.h
src/basic/json.c
src/basic/json.h
src/basic/label.c
src/basic/locale-util.c
src/basic/lockfile-util.c
src/basic/lockfile-util.h
src/basic/log.c
src/basic/login-util.c
src/basic/memfd-util.c
src/basic/memfd-util.h
src/basic/mempool.c
src/basic/mkdir-label.c
src/basic/mkdir.c
src/basic/mount-util.c
src/basic/mount-util.h
src/basic/parse-util.c
src/basic/parse-util.h
src/basic/path-util.c
src/basic/path-util.h
src/basic/prioq.c
src/basic/prioq.h
src/basic/proc-cmdline.c
src/basic/process-util.c
src/basic/process-util.h
src/basic/random-util.c
src/basic/random-util.h
src/basic/ratelimit.c
src/basic/ratelimit.h
src/basic/replace-var.c
src/basic/rlimit-util.c
src/basic/rm-rf.c
src/basic/selinux-util.c
src/basic/selinux-util.h
src/basic/sigbus.c
src/basic/signal-util.c
src/basic/siphash24.c
src/basic/siphash24.h
src/basic/smack-util.c
src/basic/smack-util.h
src/basic/socket-label.c
src/basic/socket-util.c
src/basic/socket-util.h
src/basic/stat-util.c
src/basic/stat-util.h
src/basic/strbuf.c
src/basic/strbuf.h
src/basic/string-table.c
src/basic/string-table.h
src/basic/string-util.c
src/basic/string-util.h
src/basic/strv.c
src/basic/strv.h
src/basic/strxcpyx.c
src/basic/strxcpyx.h
src/basic/syslog-util.c
src/basic/terminal-util.c
src/basic/terminal-util.h
src/basic/time-util.c
src/basic/time-util.h
src/basic/unit-name.c
src/basic/user-util.c
src/basic/utf8.c
src/basic/utf8.h
src/basic/util.c
src/basic/util.h
src/basic/verbs.c
src/basic/virt.c
src/basic/xattr-util.c
src/basic/xattr-util.h
src/basic/xml.c

index 07dfff6ad4bdb14e7e1bb57c8c3a60b6af26106a..606bb49a59dd03c24fa77c3e4dd8fa08c25b85fd 100644 (file)
@@ -23,7 +23,7 @@
 #include <sys/socket.h>
 
 #include "af-list.h"
-#include "util.h"
+#include "macro.h"
 
 static const struct af_name* lookup_af(register const char *str, register unsigned int len);
 
index 48183e381f188fdf785560a144c368adb2e68eea..0c6a15c958074b1e544216dff23a2bcf26ad6cfb 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdint.h>
+#include <string.h>
+
 #include "alloc-util.h"
+#include "macro.h"
 #include "util.h"
 
 void* memdup(const void *p, size_t l) {
index 12b602e1855781b640d61c29b17ca71c9602500b..f5097ea117538750f48f222e3d793a51938b55dd 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include <alloca.h>
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 
index 03d8ad740309e1b8beb79cb4ea39eaf5978c68e3..c1fdbbd905e45b16573d46925ad87ba623feeec1 100644 (file)
@@ -23,7 +23,7 @@
 #include <string.h>
 
 #include "arphrd-list.h"
-#include "util.h"
+#include "macro.h"
 
 static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
 
index cfc5d224e1997061fb43158c9fd2421ccbe20ef5..42c66a762e1679d7685553a13e07bf0cfedec079 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <pthread.h>
+#include <stddef.h>
 #include <unistd.h>
 
 #include "async.h"
 #include "fd-util.h"
 #include "log.h"
+#include "macro.h"
 #include "util.h"
 
 int asynchronous_job(void* (*func)(void *p), void *arg) {
index 4612297334156aa325b62894603120c30e45be50..e52ee24c05beff8de99f8f6e35599fe3bbf9fad3 100644 (file)
@@ -20,7 +20,9 @@
 ***/
 
 #include <errno.h>
+#include <linux/netlink.h>
 #include <stdio.h>
+#include <sys/socket.h>
 
 #include "alloc-util.h"
 #include "audit-util.h"
@@ -30,7 +32,6 @@
 #include "parse-util.h"
 #include "process-util.h"
 #include "user-util.h"
-#include "util.h"
 
 int audit_session_from_pid(pid_t pid, uint32_t *id) {
         _cleanup_free_ char *s = NULL;
index 2d55bab4abb39c5c9fca8dbaa47b6de284973e3e..9a78a80eb2a835644867b74798227dab20dc809e 100644 (file)
@@ -32,7 +32,6 @@
 #include "barrier.h"
 #include "fd-util.h"
 #include "macro.h"
-#include "util.h"
 
 /**
  * Barriers
index b8954694d3bb2149f4928f047095b755dec630ff..722effe834f3808d0e2be04802af7bfb4e38ad5a 100644 (file)
@@ -21,6 +21,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 #include "macro.h"
index 1449e2ea852504b682ac54fb4ea0a1775ae9c8ce..95f59e400a4e13bae9ea9bb86729324106269725 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include "alloc-util.h"
 #include "bitmap.h"
-#include "util.h"
+#include "hashmap.h"
+#include "macro.h"
 
 struct Bitmap {
         uint64_t *bitmaps;
index 9ce7b42d00b1c79d59a971d5c804922f222230e4..d2726630f1c06371410bdaac2106ff578ea7af0f 100644 (file)
@@ -21,6 +21,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+
 #include "hashmap.h"
 #include "macro.h"
 
index be40dc570221275e9b24fd5711c2f25e22255708..1aff9d53298b3bf328c24e9cc82cf89b4d6db02d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <linux/loop.h>
+#include <stddef.h>
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
 #include <sys/stat.h>
-#include <sys/vfs.h>
+#include <sys/statfs.h>
+#include <sys/sysmacros.h>
+#include <unistd.h>
+
 #ifdef HAVE_LINUX_BTRFS_H
 #include <linux/btrfs.h>
 #endif
@@ -37,6 +48,8 @@
 #include "path-util.h"
 #include "selinux-util.h"
 #include "smack-util.h"
+#include "sparse-endian.h"
+#include "time-util.h"
 #include "stat-util.h"
 #include "string-util.h"
 #include "util.h"
index 8c11ce35d26ff18591835f00ef2ec574ed80375e..31b9c0278558c93afdc64b2f4ce0e47b69a86d3c 100644 (file)
 #pragma once
 
 #include <stdbool.h>
+#include <stdint.h>
 #include <sys/types.h>
 
+#include "sd-id128.h"
+
 #include "time-util.h"
 
 typedef struct BtrfsSubvolInfo {
index c1534657ac921124ca8939d62b3e7301ad269c4e..d8d5863b03b979dfa7fbade43d3514525ad18b48 100644 (file)
@@ -25,7 +25,6 @@
 #include "bus-label.h"
 #include "hexdecoct.h"
 #include "macro.h"
-#include "util.h"
 
 char *bus_label_escape(const char *s) {
         char *r, *t;
index ed1dc4e0a7788b69483a3fc337ff27996579d913..f51153ce6d262188ebc9ed668ead09fd92c7bfb8 100644 (file)
@@ -21,6 +21,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 
index 8f60561ede715138e370a0e89f1c2899df941978..2c670a1ac6030bd0b8fdb9f83b86791ef80f1a12 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <alloca.h>
+#include <errno.h>
+#include <stddef.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 
 #include "alloc-util.h"
 #include "calendarspec.h"
 #include "fileio.h"
 #include "parse-util.h"
+#include "macro.h"
 #include "string-util.h"
 
 #define BITS_WEEKDAYS   127
index 75b699682a7ef85cce76c3d1535a320d255c62d6..4e3aa9e1d8169783a3e03a361833cc621ce2b590 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <stdbool.h>
 
+#include "time-util.h"
 #include "util.h"
 
 typedef struct CalendarComponent {
index f0974900cdd15305fe37cc39095a22156dd5102b..aac812dc522f9d07c47577e7aca224e38f9493ba 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <string.h>
 
 #include "cap-list.h"
 #include "missing.h"
 #include "parse-util.h"
+#include "macro.h"
 #include "util.h"
 
 static const struct capability_name* lookup_capability(register const char *str, register unsigned int len);
index 0eb5c03d65601f6f457675f30564c084b0c5c80f..fef722b6f2bdd20fc2abfbac1e35d81cb5ed0cbb 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <grp.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/capability.h>
 #include <sys/prctl.h>
 #include <unistd.h>
index 4eb5c2a835d60c55a4395682943e546e86e6593f..6bbf7318fd310e3788a6a2de6d1af8e3674c214b 100644 (file)
 ***/
 
 #include <stdbool.h>
+#include <stdint.h>
 #include <sys/capability.h>
+#include <sys/types.h>
 
+#include "macro.h"
 #include "util.h"
 
 unsigned long cap_last_cap(void);
index f7fc2c2c975d05dd0919a3b62ba69a74a37bbd4f..7c580caa4339eed02ec3d9b9a65ec9640256b844 100644 (file)
 #include <dirent.h>
 #include <errno.h>
 #include <ftw.h>
+#include <limits.h>
 #include <signal.h>
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <sys/statfs.h>
 #include <sys/types.h>
 #include <unistd.h>
 
 #include "process-util.h"
 #include "set.h"
 #include "special.h"
+#include "def.h"
+#include "log.h"
+#include "missing.h"
 #include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "unit-name.h"
 #include "user-util.h"
-#include "util.h"
 
 int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) {
         _cleanup_free_ char *fs = NULL;
index a80ee60bd3d7bab122a05553bac951f349764dc1..b50699579431e383f72c10903d2e11cd3d9322ae 100644 (file)
 ***/
 
 #include <dirent.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <sys/types.h>
 
 #include "def.h"
 #include "set.h"
+#include "hashmap.h"
+#include "macro.h"
 
 /* An enum of well known cgroup controllers */
 typedef enum CGroupController {
index d49ca0537ad6f6a394777bd5c50952e2e619f117..438fc63c5cb70aa4f104ef3077ad9a6b4f3e7848 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <linux/fs.h>
 
 #include "chattr-util.h"
 #include "fd-util.h"
-#include "util.h"
+#include "macro.h"
 
 int chattr_fd(int fd, unsigned value, unsigned mask) {
         unsigned old_attr, new_attr;
index 00ee4c2796df7391876de0abf07e052f28f1c9b6..00f549c023fc9b640aabba36519f4740b398632e 100644 (file)
@@ -21,6 +21,9 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <time.h>
 #include <linux/rtc.h>
 #include <stdio.h>
 #include <sys/ioctl.h>
@@ -30,7 +33,6 @@
 #include "fd-util.h"
 #include "macro.h"
 #include "string-util.h"
-#include "util.h"
 
 int clock_get_hwclock(struct tm *tm) {
         _cleanup_close_ int fd = -1;
index be9972fffffe6fc054ec12f6ab790166cf10bf07..75dad228e394574bdfc0964a132371adb7267fd9 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <dirent.h>
 #include <errno.h>
+#include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index a187ae08fe6dd542168ffe57eb67b37f0d17fc0a..c335959b74a5dc44affb7841fccc52a59fc64c23 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/sendfile.h>
+#include <sys/stat.h>
 #include <sys/xattr.h>
+#include <time.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "btrfs-util.h"
 #include "fileio.h"
 #include "fs-util.h"
 #include "io-util.h"
+#include "macro.h"
+#include "time-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "umask-util.h"
-#include "util.h"
 #include "xattr-util.h"
 
 #define COPY_BUFFER_SIZE (16*1024)
index ba0890b44249ea764c7eaa850e9542700024b535..b3fc2bb70958580da7c33173a6f25e2a5a7aa964 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <inttypes.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 int copy_file_fd(const char *from, int to, bool try_reflink);
index e2ec4ca83f06e1e9fb69cf65d3437f1f8c41b0ff..51c069395406740ed5a4c44453dd3f702a9ab210 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stddef.h>
+#include <syslog.h>
+
 #include "alloc-util.h"
 #include "cpu-set-util.h"
 #include "extract-word.h"
 #include "parse-util.h"
+#include "log.h"
+#include "macro.h"
 #include "string-util.h"
-#include "util.h"
 
 cpu_set_t* cpu_set_malloc(unsigned *ncpus) {
         cpu_set_t *c;
index 9d5af72d27da107310a6ed07de90c19c1b0f9d2d..ec58cfdd4cd207a594df22e04b40cff8766a04b8 100644 (file)
@@ -19,7 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdio.h>
+#include <string.h>
 
 #include "device-nodes.h"
 #include "utf8.h"
index 7db81f3d52e4e1110c5274fec8bdc196c9671ee1..9669c86970d53e69d0fc8fe6c111103044e0e79e 100644 (file)
@@ -21,6 +21,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stddef.h>
 #include <sys/types.h>
 
 int encode_devnode_name(const char *str, char *str_enc, size_t len);
index c433d5844aa15b236a9a6a343f0ea192a3eb1dfe..4ef5aba5a855dc54f41788c21a2e955f1ed118e1 100644 (file)
 
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 #include "dirent-util.h"
+#include "path-util.h"
 #include "string-util.h"
 
 int dirent_ensure_type(DIR *d, struct dirent *de) {
index 5866a755f4a80423c0a4a3759dcf44cbd42e0852..58273bb988c62c2a3acddff951a9b2584e7a437a 100644 (file)
 ***/
 
 #include <dirent.h>
+#include <errno.h>
+#include <stdbool.h>
 
 #include "path-util.h"
+#include "macro.h"
 
 int dirent_ensure_type(DIR *d, struct dirent *de);
 
index 441169db311eb3118be49ff36267d26ebd168a83..fe8c825f365d37fdc4a84d52f035e3456ce77741 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
-#include "def.h"
 #include "env-util.h"
 #include "parse-util.h"
+#include "extract-word.h"
+#include "macro.h"
 #include "string-util.h"
 #include "strv.h"
 #include "utf8.h"
-#include "util.h"
 
 #define VALID_CHARS_ENV_NAME                    \
         DIGITS LETTERS                          \
index 5efffa3dc72483952f2a44bc2f853a1e294dd1b8..3b83a63a78f686baf0981d8ce4ea9fd83e65c223 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
 
 #include "macro.h"
 
index 22869e41366724e5c6269a1ae9024eb006b15834..0a66902ac9029a36342bb5f110726f4cc7e90fb6 100644 (file)
@@ -22,7 +22,7 @@
 #include <string.h>
 
 #include "errno-list.h"
-#include "util.h"
+#include "macro.h"
 
 static const struct errno_name* lookup_errno(register const char *str,
                                                  register unsigned int len);
index 42a84c93174e619736e33b7a395179c947deca9b..ab282efa3c48cf27dbe10271b3addba935ea03f9 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include "alloc-util.h"
 #include "escape.h"
 #include "hexdecoct.h"
-#include "string-util.h"
+#include "macro.h"
 #include "utf8.h"
-#include "util.h"
 
 size_t cescape_char(char c, char *buf) {
         char * buf_old = buf;
index 52ebf11c4a46d01b9d6ecd0519397d67ea3c5b5a..c710f017432a88389afcb7e69cf41293349e263d 100644 (file)
 ***/
 
 #include <inttypes.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 
+#include "string-util.h"
+
 /* What characters are special in the shell? */
 /* must be escaped outside and inside double-quotes */
 #define SHELL_NEED_ESCAPE "\"\\`$"
index 2bf3bfec1def03461544c1c2298452bdfc79e951..bc54f8f5f4ac565218bcd83b50b08fc20b4acbeb 100644 (file)
@@ -19,7 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <net/ethernet.h>
 #include <stdio.h>
+#include <sys/types.h>
 
 #include "ether-addr-util.h"
 #include "macro.h"
index 7259cd1d18ae612b2679b64d89914a6427babdbf..850f58fd985e6f134dd647de6f38348736d43356 100644 (file)
@@ -24,6 +24,8 @@
 #include <stdbool.h>
 
 #include "set.h"
+#include "hashmap.h"
+#include "macro.h"
 
 typedef enum ExitStatus {
         /* EXIT_SUCCESS defined by libc */
index fd495692faec6ea4c08fdade937cc6962fe15867..7cc2a1de136761ac013cc661884095aee86440d6 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+
 #include "alloc-util.h"
 #include "escape.h"
 #include "extract-word.h"
+#include "log.h"
+#include "macro.h"
 #include "string-util.h"
 #include "utf8.h"
-#include "util.h"
 
 int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags) {
         _cleanup_free_ char *s = NULL;
index d1b1db3a4ddc83b8c73ecf7c3ff51a19885d2fef..678ac3b1952b4773ddfd618fe6274ed960cbaf86 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "dirent-util.h"
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/resource.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
 #include "fd-util.h"
 #include "parse-util.h"
 #include "socket-util.h"
+#include "macro.h"
+#include "missing.h"
+#include "path-util.h"
 #include "util.h"
 
 int close_nointr(int fd) {
index e5452f3bb0e246a7b76032ffc6f967dbf760b573..654ec5a6390f1000331c6c70126ea033ddd5edd1 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <alloca.h>
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stddef.h>
 
 #include "sd-daemon.h"
 
-#include "dirent-util.h"
 #include "fd-util.h"
 #include "fdset.h"
 #include "macro.h"
 #include "parse-util.h"
 #include "set.h"
-#include "util.h"
+#include "log.h"
+#include "path-util.h"
 
 #define MAKE_SET(s) ((Set*) s)
 #define MAKE_FDSET(s) ((FDSet*) s)
index 70d8acbcff3434e5e0983f1a93eeaea391d5afe1..58a5b45f28b088ef55c279c1e0c08136631bcb9d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+
 #include "set.h"
+#include "hashmap.h"
+#include "macro.h"
 
 typedef struct FDSet FDSet;
 
index 0405822ce08c4511cadefca4e4c8d2411b823cae..52a1515cd7e95b20a6f26b7557ae4e8956985dde 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <sys/stat.h>
+
 #include "fileio-label.h"
 #include "selinux-util.h"
-#include "util.h"
+#include "fileio.h"
 
 int write_string_file_atomic_label(const char *fn, const char *line) {
         int r;
index 10aacdc56dc11f1465034cf9c57d083b6b77bdf2..684ce3d58f01b9bd7c2bdeff145b4fab196296b4 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
 #include "parse-util.h"
 #include "path-util.h"
 #include "random-util.h"
+#include "log.h"
+#include "macro.h"
+#include "time-util.h"
 #include "stdio-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "umask-util.h"
 #include "utf8.h"
-#include "util.h"
 
 int write_string_stream(FILE *f, const char *line, bool enforce_newline) {
 
index 2b6189ad909cbc3f7cfb24bddb2dd54423a3e450..cd7abee98996fc02f1a9e3d2698b915f1790242a 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <dirent.h>
+#include <errno.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <unistd.h>
+
 #include "alloc-util.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "mkdir.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "log.h"
+#include "macro.h"
+#include "missing.h"
+#include "time-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "user-util.h"
index 5fbb7bc4c3e0f74c3c9616a590400060aca575e3..67ed214b51971d99eb14cff7cf4b1ad4521353f6 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <fcntl.h>
 #include <limits.h>
+#include <stdbool.h>
+#include <stdint.h>
 #include <sys/inotify.h>
 #include <sys/types.h>
 #include <unistd.h>
index 0bfbcb1d37340749d4b2c738212c773b40c40ed9..a0be0efd407e7e5f95485f16c1a45cdd6886ed96 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <glob.h>
 
 #include "glob-util.h"
-#include "string-util.h"
+#include "macro.h"
 #include "strv.h"
-#include "util.h"
 
 int glob_exists(const char *path) {
         _cleanup_globfree_ glob_t g = {};
index 793adf4a6c910978e8b2fa90d0024e1c8247a9c8..a0a5efe5b6157a2c2f75346bbbcfbe8e13032be9 100644 (file)
@@ -21,6 +21,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
 #include <string.h>
 
 #include "macro.h"
index d89a2f3ed960a9146b8c50fa97fb3bfa879524ce..542110503f7f37cd6119e0a4c0918620ea4ef330 100644 (file)
@@ -4,6 +4,8 @@
  *  Copyright 2000, 2005 Red Hat, Inc.
  */
 
+#include <stdlib.h>
+
 #include "gunicode.h"
 
 #define unichar uint32_t
index 6e501ef6ff43185145c22585f7a3ebbfd6fe6ce4..b3954e3223bd8963ee24594e028a195ae80983a2 100644 (file)
@@ -21,8 +21,9 @@
 ***/
 
 #include <errno.h>
-#include <pthread.h>
+#include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "alloc-util.h"
 #include "hashmap.h"
index ed6a092d82360cb10231736f5ddd87d6083aa99d..708811124b0c0c64728a0435bd10993bf5eb84cb 100644 (file)
@@ -22,7 +22,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <limits.h>
 #include <stdbool.h>
+#include <stddef.h>
 
 #include "macro.h"
 #include "siphash24.h"
index 4eb566b15aadd0d5d9a2f6a6eee2fb6bed73c662..1e907de2282916ed7fdf3a699255ef97e127aa94 100644 (file)
 ***/
 
 #include <ctype.h>
-#include <inttypes.h>
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
 
 #include "alloc-util.h"
 #include "hexdecoct.h"
-#include "util.h"
+#include "macro.h"
 
 char octchar(int x) {
         return '0' + (x & 7);
index 4aeb4c3bdcb0672d2533d93cd3d4d582cc33b7db..d9eb54a8a1ca4ff04d7912889044007f37bb645e 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <sys/types.h>
 
index c57a3cbd60e4ea8a901e1f03ffd4edfa1416e3cf..795afb6d006efabfb303871ca3fd84ff513ce309 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <ctype.h>
+#include <bits/local_lim.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
 #include <sys/utsname.h>
+#include <unistd.h>
 
 #include "fd-util.h"
 #include "fileio.h"
 #include "hostname-util.h"
+#include "macro.h"
 #include "string-util.h"
-#include "util.h"
 
 bool hostname_is_set(void) {
         struct utsname u;
index b75c39aac753c22b977f6c49b7d575286915dd7f..5143dddf8f4e7db5c6b98a8d904ee19c5cd6dbaf 100644 (file)
 ***/
 
 #include <arpa/inet.h>
+#include <endian.h>
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
 
 #include "alloc-util.h"
 #include "in-addr-util.h"
+#include "macro.h"
+#include "util.h"
 
 int in_addr_is_null(int family, const union in_addr_union *u) {
         assert(u);
index 58f55b341850c866d39f724e2c04d833f2301f8c..bcc116c783a8d1f6cae96b0ae0d5d3c017939ac7 100644 (file)
@@ -22,6 +22,8 @@
 ***/
 
 #include <netinet/in.h>
+#include <stddef.h>
+#include <sys/socket.h>
 
 #include "macro.h"
 #include "util.h"
index ac8f93ff57a9b52a2775bfd57949e2208b4d2b8f..e83e7cec72d3261852c0d9ee747b1877a4db58cf 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <limits.h>
 #include <poll.h>
+#include <stdio.h>
+#include <time.h>
 #include <unistd.h>
 
 #include "io-util.h"
+#include "time-util.h"
 
 int flush_fd(int fd) {
         struct pollfd pollfd = {
index cd2aa75ad2c6859cde3a9b8f2a58fca1acb4cb6e..5f77a556c047112ebffa183b7f573066a3686279 100644 (file)
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 #include <sys/uio.h>
 
+#include "macro.h"
 #include "time-util.h"
 
 int flush_fd(int fd);
index 9d5dedb934c79c4dc4162dc7a719486fa6026a37..1523e9fb0933b15eee2d4fa174d1ae12f056955c 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <math.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 
 #include "alloc-util.h"
index 8a7d79cb17e09ced60d332033221e75c52474fa1..df3f62f2067bae170588401854b2ee738ff24b81 100644 (file)
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
 
+#include "macro.h"
 #include "util.h"
 
 enum {
index f33502f90f29730f9667a37d8d37e907aaadf593..70e6ee20bfc7b16084ed242dfaa376f855cef9b2 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
 #include "label.h"
 #include "selinux-util.h"
 #include "smack-util.h"
-#include "util.h"
+#include "macro.h"
 
 int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
         int r, q;
index b87fd7670bf410a58aa1bff5a2805821e37e1026..708da0d304d4020a6afd7aff66c08aa008669038 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
 #include <langinfo.h>
+#include <libintl.h>
 #include <locale.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
 
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "locale-util.h"
 #include "path-util.h"
 #include "set.h"
+#include "hashmap.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "utf8.h"
-#include "util.h"
 
 static int add_locales_from_archive(Set *locales) {
         /* Stolen from glibc... */
index 0bdbae480b1c9e9902c621fb23157bd203d2c2e8..704ae6cc52dbb9eacf3c1087eeba14616b1b4266 100644 (file)
 ***/
 
 #include <errno.h>
-#include <limits.h>
-#include <stdbool.h>
+#include <fcntl.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #include <sys/file.h>
+#include <sys/stat.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
-#include "fileio.h"
 #include "fs-util.h"
 #include "lockfile-util.h"
 #include "path-util.h"
-#include "util.h"
+#include "macro.h"
 
 int make_lock_file(const char *p, int operation, LockFile *ret) {
         _cleanup_close_ int fd = -1;
index 38d47094bd5179c3437cffbae5d4b6d96108327e..3c514c9e62d43127abdc6aed4ed3a3727ea7c46b 100644 (file)
@@ -21,6 +21,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stddef.h>
+
 #include "macro.h"
 #include "missing.h"
 
index fe29cacd9e3e6a0498aabd1279cc2659464bf26d..829f85a5d8a7700aff2e7056010cfc0752fb3821 100644 (file)
 
 #include <errno.h>
 #include <fcntl.h>
-#include <printf.h>
+#include <inttypes.h>
+#include <limits.h>
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdio.h>
+#include <string.h>
+#include <sys/signalfd.h>
 #include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/uio.h>
 #include <sys/un.h>
+#include <time.h>
 #include <unistd.h>
 
 #include "sd-messages.h"
@@ -43,6 +49,7 @@
 #include "process-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
+#include "time-util.h"
 #include "stdio-util.h"
 #include "string-table.h"
 #include "string-util.h"
index 41cef14e73bba42684e1130f71213f23c914c1eb..4e08fe389581c59d9985f3fa15805d863a5a677d 100644 (file)
@@ -19,7 +19,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "def.h"
+#include <string.h>
+
 #include "login-util.h"
 #include "string-util.h"
 
index 92630f6b2591b5e226599f73f35270ef7184bd31..a9b2151195684aa0fef2e66bee01c07a1b7eca77 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <fcntl.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #ifdef HAVE_LINUX_MEMFD_H
 #include <linux/memfd.h>
 #endif
@@ -31,9 +34,9 @@
 #include "fd-util.h"
 #include "memfd-util.h"
 #include "missing.h"
+#include "macro.h"
 #include "string-util.h"
 #include "utf8.h"
-#include "util.h"
 
 int memfd_new(const char *name) {
         _cleanup_free_ char *g = NULL;
index 3e4de008a4ff3ffdeb4c857fa83b703fad8d9773..2a89361c4cf95212ba37d63868098e84b9194df7 100644 (file)
@@ -22,6 +22,8 @@
 ***/
 
 #include <inttypes.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 int memfd_new(const char *name);
index 9ee6e6a76d622b36281208b9f4ae8fd9024a4516..1822d3956f636089a210cdfd3c3b62f7cfef1a92 100644 (file)
@@ -20,6 +20,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdint.h>
+#include <stdlib.h>
+
 #include "macro.h"
 #include "mempool.h"
 #include "util.h"
index c241ef6064e74e1a3d8eecf18bf3ebe8def54e2e..c9e17f7680812976e271e8f73d6ee0e87814c855 100644 (file)
@@ -21,6 +21,7 @@
 ***/
 
 #include <stdio.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "label.h"
index 5d7fb9a12d9721031fd49ad99fed940b16e07315..4b809541b101cd2e22967800fe4bd5cec6b7fde5 100644 (file)
 ***/
 
 #include <errno.h>
+#include <stdbool.h>
 #include <string.h>
+#include <sys/stat.h>
 
 #include "fs-util.h"
 #include "mkdir.h"
 #include "path-util.h"
+#include "macro.h"
 #include "stat-util.h"
 #include "user-util.h"
-#include "util.h"
 
 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) {
         struct stat st;
index 29997b1ce7414b5f77dc337324f51bc6f0abaca8..aaac2d47bd1fc76424f12e2e199efb8d395feaf5 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/mount.h>
+#include <sys/stat.h>
 #include <sys/statvfs.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "escape.h"
@@ -31,9 +35,9 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "set.h"
+#include "hashmap.h"
 #include "stdio-util.h"
 #include "string-util.h"
-#include "util.h"
 
 static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id) {
         char path[strlen("/proc/self/fdinfo/") + DECIMAL_STR_MAX(int)];
index 48954c2d67710c677eaa6ef20cc0fc14313c419b..3be75e6614f376fe5f00a9558c603fdf5d0460e7 100644 (file)
 #include <fcntl.h>
 #include <mntent.h>
 #include <stdbool.h>
+#include <stdio.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
 #include "missing.h"
+#include "macro.h"
 
 int fd_is_mount_point(int fd, const char *filename, int flags);
 int path_is_mount_point(const char *path, int flags);
index 3ae99d93346de28829528e434f114089feb1fa25..3d8123ca0dffb8d86244700e23b14941807ddd32 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <inttypes.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <xlocale.h>
+
 #include "alloc-util.h"
 #include "extract-word.h"
 #include "parse-util.h"
+#include "macro.h"
 #include "string-util.h"
-#include "util.h"
 
 int parse_boolean(const char *v) {
         assert(v);
index 125de53d7afa06a59e8b4bde2a80820d54f89b26..af439cfaa7f7291cbe6dd987545f698978b55d63 100644 (file)
@@ -22,6 +22,9 @@
 ***/
 
 #include <inttypes.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 #include "macro.h"
index ec90c432a4bdb48d5a906de58adef2f0eb8fc3e2..95b1052aebf6eaa0280e93903d833b08f789686b 100644 (file)
 ***/
 
 #include <errno.h>
-#include <fcntl.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/statvfs.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
 /* When we include libgen.h because we need dirname() we immediately
 #undef basename
 
 #include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
 #include "fs-util.h"
 #include "log.h"
 #include "macro.h"
 #include "missing.h"
-#include "parse-util.h"
 #include "path-util.h"
+#include "extract-word.h"
+#include "time-util.h"
 #include "stat-util.h"
 #include "string-util.h"
 #include "strv.h"
-#include "util.h"
 
 bool path_is_absolute(const char *p) {
         return p[0] == '/';
index 989e0f900498324103082dc5962287bd60fcd848..84472d38c73cbb10f5e68128953fc319ee4750e1 100644 (file)
@@ -21,7 +21,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <alloca.h>
 #include <stdbool.h>
+#include <stddef.h>
 
 #include "macro.h"
 #include "time-util.h"
index 75906989114bc4add71ccf8cd602e06b552e4129..7d420d8a7bb8bc20f089a77dd0d0264d637e0d9b 100644 (file)
  * The underlying algorithm used in this implementation is a Heap.
  */
 
+#include <errno.h>
+#include <stdlib.h>
+
 #include "alloc-util.h"
 #include "prioq.h"
-#include "util.h"
+#include "hashmap.h"
 
 struct prioq_item {
         void *data;
index 1c044b135ce7233e099aee073ce2ade552a7004e..6a2451387ce3dd05c74a79e86e06d5d45dedf003 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+
 #include "hashmap.h"
+#include "macro.h"
 
 typedef struct Prioq Prioq;
 
index 4464573c5b6f55fdb29e94a89f14f07d42855a85..4e8eba10abef54cf3f76d17619d63762ff190500 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+#include <stddef.h>
+#include <string.h>
+
 #include "alloc-util.h"
 #include "extract-word.h"
 #include "fileio.h"
index 7631928d5f11a0ba9c73930412204edacc534c12..1d60811cbf9b27c8006f4f1f32cd88f204bf784d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <assert.h>
 #include <ctype.h>
 #include <errno.h>
+#include <limits.h>
+#include <linux/oom.h>
 #include <sched.h>
 #include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/personality.h>
 #include <sys/prctl.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <syslog.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
@@ -40,6 +43,8 @@
 #include "log.h"
 #include "process-util.h"
 #include "signal-util.h"
+#include "macro.h"
+#include "missing.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "user-util.h"
index fdc7e1bdef76d7c430e4ad140e709cacb15c8c2e..f4c44376241159f73dd7608f44ddad88cd0d2645 100644 (file)
@@ -22,6 +22,7 @@
 #include <alloca.h>
 #include <signal.h>
 #include <stdbool.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
index 2f5c16e2afbdc7fc3230d7111007960ce8e7b996..e1543da5a37ca198bee23e6b720255571aab42c3 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <elf.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <sys/time.h>
 #include <linux/random.h>
 #include <stdint.h>
+
 #ifdef HAVE_SYS_AUXV_H
 #include <sys/auxv.h>
 #endif
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <time.h>
 
 #include "fd-util.h"
 #include "io-util.h"
 #include "missing.h"
 #include "random-util.h"
 #include "time-util.h"
-#include "util.h"
 
 int dev_urandom(void *p, size_t n) {
         static int have_syscall = -1;
index f7862c8c8b58cd8552743b183c527d7e730a7353..3cee4c501408e5143a485f4c095497d6a3e3b0b0 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stddef.h>
 #include <stdint.h>
 
 int dev_urandom(void *p, size_t n);
index 81fc9c19ff6c30eff6d1be1c5f9df48fc7a7e90d..ee0f8176b943d9ad9e6bf014cc1fb1339b8b5f3c 100644 (file)
 ***/
 
 
+#include <sys/time.h>
+
 #include "ratelimit.h"
+#include "macro.h"
 
 /* Modelled after Linux' lib/ratelimit.c by Dave Young
  * <hidave.darkstar@gmail.com>, which is licensed GPLv2. */
index 58efca7df14108884546dc16c69bb9bba5f2ad73..98c81f6b9ef4d52340e52c6e15ea634747d6a8c4 100644 (file)
@@ -21,6 +21,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+
+#include "time-util.h"
 #include "util.h"
 
 typedef struct RateLimit {
index bf757cbc48e011ec39da9356111b207700b0b2fb..8c3279b376fc720966b8ad1be5f4a0a7950aa72a 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stddef.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "alloc-util.h"
 #include "macro.h"
 #include "replace-var.h"
 #include "string-util.h"
-#include "util.h"
 
 /*
  * Generic infrastructure for replacing @FOO@ style variables in
index 2627c813fc8c8a355d9a253f9dabe49169bbea24..2de965daa62f4b9837ce9d43e6ff7e0dd12392df 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <sys/resource.h>
+
 #include "missing.h"
 #include "rlimit-util.h"
+#include "macro.h"
 #include "string-table.h"
-#include "util.h"
 
 int setrlimit_closest(int resource, const struct rlimit *rlim) {
         struct rlimit highest, fixed;
index 8ec7dd75ee19d31d2d8c6a60974420018d4dcc68..0408e22777280d32b059c568e63da56aead14ab6 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <unistd.h>
+
 #include "btrfs-util.h"
 #include "fd-util.h"
 #include "mount-util.h"
 #include "path-util.h"
 #include "rm-rf.h"
+#include "log.h"
+#include "macro.h"
 #include "stat-util.h"
 #include "string-util.h"
-#include "util.h"
 
 int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
         _cleanup_closedir_ DIR *d = NULL;
index 7e4ae33efe0589e332d9e9d01bacca09190cb1fd..9be8e2c76fb6242315fdb8b8c6be62e893260784 100644 (file)
 
 #include <errno.h>
 #include <malloc.h>
+#include <stddef.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
 #include <sys/un.h>
+#include <syslog.h>
 
 #ifdef HAVE_SELINUX
 #include <selinux/context.h>
 #include "alloc-util.h"
 #include "path-util.h"
 #include "selinux-util.h"
-#include "strv.h"
+#include "log.h"
+#include "macro.h"
+#include "time-util.h"
+#include "util.h"
 
 #ifdef HAVE_SELINUX
 DEFINE_TRIVIAL_CLEANUP_FUNC(security_context_t, freecon);
index 95a2fcdbcae96ae529e12202411593fc39b1d113..0111f4c858458af671a87c61f6b8df214f14e3b6 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <stdbool.h>
 #include <sys/socket.h>
+#include <sys/types.h>
 
 #include "macro.h"
 
index c535c89d5280dbd141fbe2cc6b7b303d97a92043..fe2e2d1a28003e603af165ec387d86007ba4c283 100644 (file)
@@ -19,7 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <signal.h>
+#include <stddef.h>
 #include <sys/mman.h>
 
 #include "macro.h"
index 8038bc891d52a3e963dca591da7394db9207814b..fd9258dfca8f376ab149b18195b8b88ce0e4b268 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+
 #include "parse-util.h"
 #include "signal-util.h"
+#include "macro.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "util.h"
 
 int reset_all_signal_handlers(void) {
         static const struct sigaction sa = {
index 10fc56da6936ad984f43120cdbf54d896a9d0f64..65667b98599d48421d8de30967fa1204b7be8e65 100644 (file)
@@ -18,9 +18,8 @@
 */
 
 #include "siphash24.h"
-#include "sparse-endian.h"
+#include "macro.h"
 #include "unaligned.h"
-#include "util.h"
 
 static inline uint64_t rotate_left(uint64_t x, uint8_t b) {
         assert(b < 64);
index ba4f7d01b65c3e115b2198cdf006bcc51a235a1b..3f7e20362b2ac6c837d1517ca7cf93e5fa9d264f 100644 (file)
@@ -1,6 +1,8 @@
 #pragma once
 
 #include <inttypes.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 struct siphash {
index fcc046098dcd4a8ecf83ac15cfced98660220141..e8030c92f30e666962deb71524879baa983dce08 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
 #include <sys/xattr.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "fileio.h"
 #include "path-util.h"
 #include "process-util.h"
 #include "smack-util.h"
+#include "log.h"
+#include "macro.h"
 #include "string-table.h"
-#include "util.h"
 #include "xattr-util.h"
 
 #ifdef HAVE_SMACK
index e756dc8c2896f7f0bd06453b95f9f52c8289b7ce..1d85b52a335a71440da9d6769e43cdf11f2ef315 100644 (file)
@@ -24,6 +24,7 @@
 ***/
 
 #include <stdbool.h>
+#include <sys/types.h>
 
 #include "macro.h"
 
index e5d4efc719e61326d7dab7bafdc9f58898848215..2dc6c76752e86de3f05312ecf61de1e6eac110c5 100644 (file)
 ***/
 
 #include <errno.h>
+#include <netinet/in.h>
+#include <stdbool.h>
 #include <stddef.h>
 #include <string.h>
+#include <sys/socket.h>
 #include <sys/stat.h>
+#include <sys/un.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
@@ -32,7 +36,7 @@
 #include "mkdir.h"
 #include "selinux-util.h"
 #include "socket-util.h"
-#include "util.h"
+#include "log.h"
 
 int socket_address_listen(
                 const SocketAddress *a,
index 1acab1ef95bab65534dad3bf0717a1b5e083235e..240fb60212b26d11098c145ad450930fdf2c746b 100644 (file)
 
 #include <arpa/inet.h>
 #include <errno.h>
+#include <limits.h>
 #include <net/if.h>
 #include <netdb.h>
 #include <netinet/ip.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <sys/types.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
@@ -39,6 +41,7 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "socket-util.h"
+#include "log.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "user-util.h"
index 129ffa811ccc405d6bd9036d9b1065f2c2f72278..f9c90e0e738a18e14e179d951fa790c0352fe6dc 100644 (file)
 
 #include <netinet/ether.h>
 #include <netinet/in.h>
+#include <stdbool.h>
+#include <stddef.h>
 #include <sys/socket.h>
+#include <sys/types.h>
 #include <sys/un.h>
 #include <linux/netlink.h>
 #include <linux/if_packet.h>
index 3bc66b3be79ab33b489b4bdb207beb5481e1beaf..21a8fb77a1129c1aa5a59f6480a474592e631ed0 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <dirent.h>
+#include <errno.h>
 #include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <linux/magic.h>
 #include <sys/statvfs.h>
 #include <unistd.h>
index fb9246427464c375938f7751ae9a07d8b4f24cf0..8e031e61550302d6bc328998690db1bd1490d687 100644 (file)
@@ -22,7 +22,9 @@
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
 #include <sys/stat.h>
+#include <sys/statfs.h>
 #include <sys/types.h>
 #include <sys/vfs.h>
 
index f4f702a05abd1775b7be27bb3ea26b50bfb47321..c9984bef08c8137dc178d2faf27e96671656c5de 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "alloc-util.h"
 #include "strbuf.h"
-#include "util.h"
 
 /*
  * Strbuf stores given strings in a single continuous allocated memory
index fbc4e5f2a1d6c30780c8450e39f94731a0080843..69565f7e2cd5501b9e62a5b72b64cb329c68c683 100644 (file)
@@ -21,7 +21,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stddef.h>
 #include <stdint.h>
+#include <sys/types.h>
 
 struct strbuf {
         char *buf;
index a860324fc9883da658fa3f3ceacd5e6e0fdf7d5b..07a6d785f829be6751063bb9b2bed461fd11f1de 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "string-util.h"
 #include "string-table.h"
 
 ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) {
index 51b6007214e467c879f7c2642d969ca028b06f2d..2181a3a7676270df557fb1f3cce18e0547dd11fb 100644 (file)
@@ -22,6 +22,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <string.h>
index 6006767daac5b025fdb56e44fd28d82a2443f20b..8178c7093fc04085ddeb74719e34d747c5ed1ce7 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "alloc-util.h"
 #include "gunicode.h"
+#include "macro.h"
 #include "string-util.h"
 #include "utf8.h"
 #include "util.h"
index 54f9d3058cc5257595e30f2c011943c77be67e0d..b59b9b5a710cff0f125b3c0cf705656993b1904d 100644 (file)
@@ -21,7 +21,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <alloca.h>
 #include <stdbool.h>
+#include <stddef.h>
 #include <string.h>
 
 #include "macro.h"
index 771781f9fc764386cf772097b651e873678e6170..0a3d15706f7f89cbfeb7949b89ed925d965957c0 100644 (file)
 ***/
 
 #include <errno.h>
+#include <fnmatch.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "alloc-util.h"
 #include "escape.h"
+#include "extract-word.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
index e66794fc34d9f59caebf38b2c8f72f97c1547979..d0dd08baf3ba3c7ec3dad13973117feeffc41e05 100644 (file)
 #include <fnmatch.h>
 #include <stdarg.h>
 #include <stdbool.h>
+#include <stddef.h>
 
 #include "extract-word.h"
+#include "alloc-util.h"
+#include "macro.h"
 #include "util.h"
 
 char *strv_find(char **l, const char *name) _pure_;
index 088ba53c29d1f6b3c30c7cfa603b4929b6110891..c454171de10b56f09eedf7e91e754c16748f7414 100644 (file)
@@ -25,6 +25,7 @@
  * Returns the * remaining size, and 0 if the string was truncated.
  */
 
+#include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 
index ccc7e52f3757a4afb5ebbbdff6752476027cd6d0..02e22e629429e67dc3c9169c393027004bf30c29 100644 (file)
@@ -22,6 +22,8 @@
 ***/
 
 
+#include <stddef.h>
+
 #include "macro.h"
 
 size_t strpcpy(char **dest, size_t size, const char *src);
index 01577941a08507244d39366677410be77c7170ad..7dc2761b6f050a62f4091bbff088fe33f09bec4f 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <string.h>
 #include <syslog.h>
 
-#include "assert.h"
 #include "hexdecoct.h"
+#include "macro.h"
 #include "string-table.h"
 #include "syslog-util.h"
 
index 3931b03bc2a05bbf2029bf502cdf8c52e6de6b92..68664a152ffcc530289556ae239f002893d450fb 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <assert.h>
+#include <errno.h>
 #include <fcntl.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/inotify.h>
+#include <sys/socket.h>
+#include <sys/sysmacros.h>
+#include <sys/time.h>
 #include <linux/kd.h>
 #include <linux/tiocl.h>
 #include <linux/vt.h>
 #include <poll.h>
 #include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/stat.h>
 #include <sys/types.h>
 #include <termios.h>
-#include <time.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
 #include "fs-util.h"
 #include "io-util.h"
 #include "parse-util.h"
-#include "path-util.h"
 #include "process-util.h"
 #include "socket-util.h"
+#include "log.h"
+#include "macro.h"
 #include "stat-util.h"
 #include "string-util.h"
 #include "terminal-util.h"
index b2c7a297ae816ecddda0c82d7f3919988f296afa..597a0060ad8a3f5028b054c72c20488c178c5b17 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <sys/types.h>
 
 #include "macro.h"
 #include "time-util.h"
index b9da6991da0192b9977cb3f91166c08ecafdac0a..a9296d6ee66a0925b79dae052fd944f9afe09b4a 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
 #include <sys/timerfd.h>
 #include <sys/timex.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "log.h"
+#include "macro.h"
 #include "string-util.h"
 #include "strv.h"
 #include "time-util.h"
-#include "util.h"
 
 usec_t now(clockid_t clock_id) {
         struct timespec ts;
index 0417c29cddbe4b5506745a190e42f9fc1f0b5bcb..7321e3c670c8670b57a2a057f1397aba7b2db715 100644 (file)
@@ -22,6 +22,9 @@
 ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <time.h>
 
index 9a55eacbfb51e3204bb966ad250c12613fda77c3..bdec97e54bf65e811e2caa9e7843f1dd918364c8 100644 (file)
 ***/
 
 #include <errno.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "alloc-util.h"
 #include "bus-label.h"
-#include "def.h"
 #include "hexdecoct.h"
 #include "path-util.h"
+#include "macro.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
-#include "util.h"
 
 #define VALID_CHARS                             \
         DIGITS LETTERS                          \
index 397880b0b1d605e18f98ccf158f8c36cf3885a9f..55c64abdd9ef6735e8be6c4b6f7aadbd84cde159 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <alloca.h>
+#include <errno.h>
+#include <fcntl.h>
 #include <grp.h>
 #include <pwd.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "macro.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "formats-util.h"
 #include "string-util.h"
 #include "user-util.h"
-#include "util.h"
 
 bool uid_is_valid(uid_t uid) {
 
index b4063a4ceca64966ee73cd405cf7fdeda5c61237..124effd6dfcd6694c055c45e66cce9162eca806a 100644 (file)
  */
 
 #include <errno.h>
-#include <inttypes.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "alloc-util.h"
 #include "hexdecoct.h"
+#include "macro.h"
 #include "utf8.h"
-#include "util.h"
 
 bool unichar_is_valid(uint32_t ch) {
 
index e745649f06f5b06fcbe7b0869a798f068820d403..16c4b5b55da2eb1932c9acd3e14742d142b76085 100644 (file)
@@ -22,6 +22,8 @@
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "macro.h"
 
index 58617b354aa6cd58224e108f6842e284449542fc..6d264e0007a6b6fbb7c94fad2a64fc3ce7371e36 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <ctype.h>
+#include <alloca.h>
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <grp.h>
-#include <langinfo.h>
-#include <libintl.h>
-#include <limits.h>
-#include <linux/magic.h>
-#include <linux/oom.h>
-#include <linux/sched.h>
-#include <locale.h>
-#include <poll.h>
-#include <pwd.h>
 #include <sched.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
 #include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/personality.h>
 #include <sys/prctl.h>
-#include <sys/stat.h>
-#include <sys/statvfs.h>
-#include <sys/time.h>
+#include <sys/statfs.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
-#include <sys/utsname.h>
-#include <sys/vfs.h>
-#include <sys/wait.h>
-#include <syslog.h>
 #include <unistd.h>
 
-/* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the
- * POSIX version which is really broken. We prefer GNU basename(). */
-#include <libgen.h>
-#undef basename
-
-#ifdef HAVE_SYS_AUXV_H
-#include <sys/auxv.h>
-#endif
-
-/* We include linux/fs.h as last of the system headers, as it
- * otherwise conflicts with sys/mount.h. Yay, Linux is great! */
-#include <linux/fs.h>
-
 #include "alloc-util.h"
 #include "build.h"
 #include "def.h"
-#include "device-nodes.h"
 #include "dirent-util.h"
-#include "env-util.h"
-#include "escape.h"
-#include "exit-status.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
-#include "gunicode.h"
 #include "hashmap.h"
-#include "hexdecoct.h"
 #include "hostname-util.h"
-#include "ioprio.h"
 #include "log.h"
 #include "macro.h"
 #include "missing.h"
-#include "mkdir.h"
 #include "parse-util.h"
 #include "path-util.h"
 #include "process-util.h"
-#include "random-util.h"
 #include "signal-util.h"
-#include "sparse-endian.h"
+#include "set.h"
+#include "time-util.h"
 #include "stat-util.h"
-#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
-#include "terminal-util.h"
 #include "user-util.h"
-#include "utf8.h"
 #include "util.h"
-#include "virt.h"
 
 /* Put this test here for a lack of better place */
 assert_cc(EAGAIN == EWOULDBLOCK);
index d9d2f72b750314afda0a039576a007b54512afa0..76a06822b747056a11f5ef0be85f41820139e522 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include <alloca.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <limits.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>
index d63062d39e3bc88c9eaf5c343cb216e5cd844604..7feb47c48e114ce0eca3a7f38e066913b3da0d98 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <getopt.h>
+#include <stdbool.h>
+#include <stddef.h>
+
+#include "log.h"
+#include "macro.h"
 #include "string-util.h"
-#include "util.h"
 #include "verbs.h"
 
 int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
index b82680a54bfbebceea112d4136129726069a3a1e..eb6794916618b60c0593b59062405791f483e4fd 100644 (file)
 ***/
 
 #include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
 #include "fileio.h"
 #include "process-util.h"
+#include "macro.h"
 #include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "util.h"
 #include "virt.h"
 
 static int detect_vm_cpuid(void) {
index 6abdaedc3e7aa5e0753d1c7326093581606f7c1a..166e2b23fab35b9a1149137b955dfa2306f954eb 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
 #include <sys/xattr.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "sparse-endian.h"
+#include "macro.h"
+#include "time-util.h"
 #include "stdio-util.h"
-#include "util.h"
 #include "xattr-util.h"
 
 int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink) {
index cf4cb12a2586d2d84a41da27e87ee4060e260c2c..a5134cba89959b5d2a35db19ea821e6ced68003b 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include <stdbool.h>
+#include <stddef.h>
 #include <sys/types.h>
 
 #include "time-util.h"
index 8126bce212622caffea5d5cc75c5e540b5aa0989..b9976cf5f18ad1c791ec9577f16b04b7db963a4d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stddef.h>
 #include <string.h>
 
+#include "macro.h"
 #include "string-util.h"
-#include "util.h"
 #include "xml.h"
 
 enum {