Commit Graph
10 Commits
Author SHA1 Message Date
Mike Yuan 0e9667fd9a basic/forward: replace tab with space 2025-06-09 20:39:23 +02:00
Yu Watanabe afcb6d671b forward: also include paths.h
It provides several important constants, especially _PATH_BSHELL, which
is used in PID1, executor, and run. The header has been included
indirectly through e.g. libmount.h, mntent.h, utmpx.h, and so on.
Let's explicitly include it in forward.h, as libmount.h and friends that
includes paths.h are irrelevant to _PATH_BSHELL, and we may easily fail
to build when code is touched.
The header is not heavy, hence should not hurt anything.
2025-06-09 22:45:23 +09:00
Daan De Meyer 1b4645d762 forward: Drop socklen_t forward declaration
This is glibc specific and doesn't exist on musl, since removing only
means adding one more include in selinux-util.h, let's drop it.

Fixes #37779
2025-06-08 10:58:56 +09:00
Daan De Meyer 0c15577abe basic + fundamental: Clean up includes
Split out of #37344.
2025-05-25 10:06:07 +02:00
Daan De Meyer 4cfd024e73 forward: Move ChaseFlags forward declaration to forward.h 2025-05-24 20:44:12 +02:00
Daan De Meyer b2ae2119c5 forward: Add more forward declarations
CGroupMask was erronously added to core-forward.h even though it
comes from src/basic so we move it to the right location.
2025-05-22 17:26:43 +02:00
Daan De Meyer 4c26a68f7b forward.h: Add forward declaration of BusObjectImplementation 2025-05-21 10:12:19 +02:00
Daan De Meyer 0dc510ab03 tpm2-util: Make sure structs/enums are named and add to forward.h
We have to name structs/enums to be able to forward declare them, so
let's do that and add the missing ones to forward.h.
2025-05-14 22:34:02 +02:00
Daan De Meyer ba6d1f9aca forward: Add forward declaration for LockFile 2025-05-14 19:20:00 +02:00
Daan De Meyer 686bbf1e7f Introduce forward.h header with forward declarations
In preparation for adopting forward declarations to reduce unnecessary
transitive includes across the tree, let's introduce a forward.h header
with forward declarations for all libc, libsystemd, basic and shared types.

Additionally, this header exports all basic integer types and errno constants,
as well as all macros including assertions macros. These header files contain
types often used in headers and are always included in every source file one
way or another anyway.

To avoid having to include memory-util.h and alloc-util.h in forward.h, we
split off the parts we need from both into cleanup-util.h and only include
cleanup-util.h in forward.h.

To keep this commit self-contained, we include cleanup-fundamental.h and
cleanup-util.h from the headers that originally contained the same macros.
We'll remove these again in a later commit that optimizes the includes in
src/basic and src/fundamental.

Split out of #37364
2025-05-14 15:44:17 +02:00