basic: include only what we use

This is a cleaned up result of running iwyu but without forward
declarations on src/basic.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-11-30 21:43:37 +01:00
parent bca27e1729
commit 11c3a36649
128 changed files with 481 additions and 135 deletions

View 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);

View File

@@ -19,7 +19,11 @@
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) {

View File

@@ -22,6 +22,7 @@
***/
#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>

View 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);

View File

@@ -19,12 +19,15 @@
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) {

View 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;

View File

@@ -32,7 +32,6 @@
#include "barrier.h"
#include "fd-util.h"
#include "macro.h"
#include "util.h"
/**
* Barriers

View 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"

View File

@@ -19,9 +19,16 @@
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;

View 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"

View File

@@ -19,9 +19,20 @@
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"

View File

@@ -22,8 +22,11 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#include "sd-id128.h"
#include "time-util.h"
typedef struct BtrfsSubvolInfo {

View 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;

View 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>

View File

@@ -19,13 +19,19 @@
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

View File

@@ -26,6 +26,7 @@
#include <stdbool.h>
#include "time-util.h"
#include "util.h"
typedef struct CalendarComponent {

View File

@@ -19,11 +19,13 @@
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);

View 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>

View File

@@ -22,8 +22,11 @@
***/
#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);

View File

@@ -22,10 +22,13 @@
#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>
@@ -46,12 +49,14 @@
#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;

Some files were not shown because too many files have changed in this diff Show More