From 883360f63aebde44a995b87a1939847b069269e8 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 1 Mar 2025 00:08:35 +0900 Subject: [PATCH] missing_type: char16_t and char32_t are always defined in uchar.h since C11 Now, we use C17, hence the fallback definitions can be dropped. --- meson.build | 4 +--- src/basic/escape.h | 1 - src/basic/missing_type.h | 12 ------------ src/basic/utf8.h | 1 - 4 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 src/basic/missing_type.h diff --git a/meson.build b/meson.build index a8876cfe01..9402103401 100644 --- a/meson.build +++ b/meson.build @@ -569,11 +569,9 @@ decl_headers = ''' #include #include #include -#include ''' -foreach decl : ['char16_t', - 'char32_t', +foreach decl : [ 'struct mount_attr', 'struct dirent64', 'struct sched_attr', diff --git a/src/basic/escape.h b/src/basic/escape.h index 224a795aa4..05c27f688e 100644 --- a/src/basic/escape.h +++ b/src/basic/escape.h @@ -8,7 +8,6 @@ #include #include "string-util.h" -#include "missing_type.h" /* What characters are special in the shell? */ /* must be escaped outside and inside double-quotes */ diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h deleted file mode 100644 index 1d17705c35..0000000000 --- a/src/basic/missing_type.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -#pragma once - -#include - -#if !HAVE_CHAR32_T -# define char32_t uint32_t -#endif - -#if !HAVE_CHAR16_T -# define char16_t uint16_t -#endif diff --git a/src/basic/utf8.h b/src/basic/utf8.h index f6158b2ef1..3b1a468c4f 100644 --- a/src/basic/utf8.h +++ b/src/basic/utf8.h @@ -7,7 +7,6 @@ #include #include "macro.h" -#include "missing_type.h" #define UTF8_REPLACEMENT_CHARACTER "\xef\xbf\xbd" #define UTF8_BYTE_ORDER_MARK "\xef\xbb\xbf"