libsystemd: use C23 explicit enum types where available
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Jul 2024 14:27:25 +0000 (16:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Jul 2024 09:57:32 +0000 (11:57 +0200)
commit92100f14c3b054903053559ed831a1b25033046c
treece3026c98892bf79d23f44ecbbd08eaca0b1be18
parent25ff515b398da61171a570baee641290374cec1a
libsystemd: use C23 explicit enum types where available

In C23 we can explicitly choose the integer type for an enum. Let's do
so to make our requirements for 64bit integers explicitly. Previously,
we'd rely on a GNU extension that would size the enum to 64bit if at
least one value outside the 32bit range is in the enum. Let's keep that
too, for compat with older compilers.

(Also, add the support for older compilers to the definition of
sd_json_dispatch_flags_t, where it was forgotten so far)
src/systemd/_sd-common.h
src/systemd/sd-device.h
src/systemd/sd-dhcp-lease.h
src/systemd/sd-json.h
src/systemd/sd-lldp-rx.h
src/systemd/sd-lldp-tx.h
src/systemd/sd-ndisc.h
src/systemd/sd-varlink-idl.h
src/systemd/sd-varlink.h