diff options
Diffstat (limited to 'src/systemd')
| -rw-r--r-- | src/systemd/sd-adapt/missing_type.h | 3 | ||||
| -rw-r--r-- | src/systemd/sd-adapt/nm-sd-adapt.h | 10 | ||||
| -rw-r--r-- | src/systemd/src/basic/escape.h | 2 | ||||
| -rw-r--r-- | src/systemd/src/basic/missing_type.h | 12 | ||||
| -rw-r--r-- | src/systemd/src/basic/utf8.h | 2 |
5 files changed, 16 insertions, 13 deletions
diff --git a/src/systemd/sd-adapt/missing_type.h b/src/systemd/sd-adapt/missing_type.h deleted file mode 100644 index 637892c2d6..0000000000 --- a/src/systemd/sd-adapt/missing_type.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -/* dummy header */ diff --git a/src/systemd/sd-adapt/nm-sd-adapt.h b/src/systemd/sd-adapt/nm-sd-adapt.h index 72dcb45888..cd2d202590 100644 --- a/src/systemd/sd-adapt/nm-sd-adapt.h +++ b/src/systemd/sd-adapt/nm-sd-adapt.h @@ -44,6 +44,10 @@ #define HAVE_SYS_AUXV_H 0 #endif +/* we build with C11 and thus <uchar.h> provides char32_t,char16_t. */ +#define HAVE_CHAR32_T 1 +#define HAVE_CHAR16_T 1 + /*****************************************************************************/ static inline NMLogLevel @@ -151,12 +155,6 @@ raw_getpid (void) { /*****************************************************************************/ -/* work around missing uchar.h */ -typedef guint16 char16_t; -typedef guint32 char32_t; - -/*****************************************************************************/ - static inline int sd_notify (int unset_environment, const char *state) { diff --git a/src/systemd/src/basic/escape.h b/src/systemd/src/basic/escape.h index cc6a897c49..515620993d 100644 --- a/src/systemd/src/basic/escape.h +++ b/src/systemd/src/basic/escape.h @@ -5,9 +5,7 @@ #include <stddef.h> #include <stdint.h> #include <sys/types.h> -#if 0 /* NM_IGNORED */ #include <uchar.h> -#endif /* NM_IGNORED */ #include "string-util.h" #include "missing_type.h" diff --git a/src/systemd/src/basic/missing_type.h b/src/systemd/src/basic/missing_type.h new file mode 100644 index 0000000000..bf8a6caa1b --- /dev/null +++ b/src/systemd/src/basic/missing_type.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#include <uchar.h> + +#if !HAVE_CHAR32_T +#define char32_t uint32_t +#endif + +#if !HAVE_CHAR16_T +#define char16_t uint16_t +#endif diff --git a/src/systemd/src/basic/utf8.h b/src/systemd/src/basic/utf8.h index eedfebe39c..628456936e 100644 --- a/src/systemd/src/basic/utf8.h +++ b/src/systemd/src/basic/utf8.h @@ -4,9 +4,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> -#if 0 /* NM_IGNORED */ #include <uchar.h> -#endif /* NM_IGNORED */ #include "macro.h" #include "missing_type.h" |
