tree-wide: Introduce sd-forward.h and shared-forward.h headers

Let's not leak details from src/shared and src/libsystemd into
src/basic, even though you can't actually do anything useful with
just forward declarations from src/shared.

The sd-forward.h header is put in src/libsystemd/sd-common as we
don't have a directory for shared internal headers for libsystemd
yet.

Let's also rename forward.h to basic-forward.h to keep things
self-explanatory.
This commit is contained in:
Daan De Meyer
2025-10-16 17:00:29 +02:00
parent ac9391c552
commit f102bc3e5f
597 changed files with 944 additions and 927 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int get_core_audit_fd(void);
void close_core_audit_fd(void);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int clock_reset_timewarp(void);
void clock_apply_epoch(bool allow_backwards);
+1 -1
View File
@@ -2,7 +2,7 @@
#pragma once
#include "conf-parser-forward.h" /* IWYU pragma: export */
#include "forward.h" /* IWYU pragma: export */
#include "shared-forward.h" /* IWYU pragma: export */
#include "unit-def.h" /* IWYU pragma: export */
typedef enum CGroupDevicePermissions CGroupDevicePermissions;
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
typedef enum CrashAction {
CRASH_FREEZE,
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "core-forward.h"
int lookup_paths_mkdir_generator(LookupPaths *p);
void lookup_paths_trim_generator(LookupPaths *p);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
typedef enum KillMode {
/* The kill mode is a property of a unit. */
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
#include "crash-handler.h"
extern bool arg_dump_core;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "cgroup.h"
#include "common-signal.h"
#include "execute.h"
#include "forward.h"
#include "shared-forward.h"
#include "log.h"
#include "path-lookup.h"
#include "show-status.h"
+1 -1
View File
@@ -5,7 +5,7 @@
Copyright © 2016 Djalal Harouni
***/
#include "forward.h"
#include "core-forward.h"
#include "list.h"
#include "runtime-scope.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int mac_selinux_setup(bool *loaded_policy);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
/* Manager status */
+1 -1
View File
@@ -7,6 +7,6 @@
Nathaniel Chen <nathaniel.chen@intel.com>
***/
#include "forward.h"
#include "shared-forward.h"
int mac_smack_setup(bool *loaded_policy);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
/* Flags that identify the various "atomic" behaviours a specific dependency type implies. Each dependency is
* a combination of one or more of these flags that define what they actually entail. */
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int unit_cgroup_context_build_json(sd_json_variant **ret, const char *name, void *userdata);
int unit_cgroup_runtime_build_json(sd_json_variant **ret, const char *name, void *userdata);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int rlimit_build_json(sd_json_variant **ret, const char *name, void *userdata);
int rlimit_table_build_json(sd_json_variant **ret, const char *name, void *userdata);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int vl_method_get_user_record(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
int vl_method_get_group_record(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
+1 -1
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
int vl_method_describe_manager(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "shared-forward.h"
#define VARLINK_ERROR_UNIT_NO_SUCH_UNIT "io.systemd.Unit.NoSuchUnit"