Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171088515
D59385.id185912.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D59385.id185912.diff
View Options
diff --git a/include/wchar.h b/include/wchar.h
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -97,6 +97,9 @@
#define WCHAR_MIN __WCHAR_MIN
#define WCHAR_MAX __WCHAR_MAX
+#if __ISO_C_VISIBLE >= 2023
+#define WCHAR_WIDTH __WCHAR_WIDTH
+#endif
#ifndef WEOF
#define WEOF ((wint_t)-1)
diff --git a/sys/arm/include/_stdint.h b/sys/arm/include/_stdint.h
--- a/sys/arm/include/_stdint.h
+++ b/sys/arm/include/_stdint.h
@@ -166,7 +166,6 @@
#define PTRDIFF_WIDTH INT32_WIDTH
#define SIG_ATOMIC_WIDTH INT32_WIDTH
#define SIZE_WIDTH INT32_WIDTH
-#define WCHAR_WIDTH INT32_WIDTH
#define WINT_WIDTH INT32_WIDTH
#endif /* __ISO_C_VISIBLE >= 2023 */
diff --git a/sys/arm64/include/_stdint.h b/sys/arm64/include/_stdint.h
--- a/sys/arm64/include/_stdint.h
+++ b/sys/arm64/include/_stdint.h
@@ -168,7 +168,6 @@
#define PTRDIFF_WIDTH INT64_WIDTH
#define SIG_ATOMIC_WIDTH INT64_WIDTH
#define SIZE_WIDTH INT64_WIDTH
-#define WCHAR_WIDTH INT32_WIDTH
#define WINT_WIDTH INT32_WIDTH
#endif /* __ISO_C_VISIBLE >= 2023 */
diff --git a/sys/powerpc/include/_stdint.h b/sys/powerpc/include/_stdint.h
--- a/sys/powerpc/include/_stdint.h
+++ b/sys/powerpc/include/_stdint.h
@@ -213,7 +213,6 @@
#define SIZE_WIDTH INT32_WIDTH
#endif
#define SIG_ATOMIC_WIDTH INT32_WIDTH
-#define WCHAR_WIDTH INT32_WIDTH
#define WINT_WIDTH INT32_WIDTH
#endif /* __ISO_C_VISIBLE >= 2023 */
diff --git a/sys/riscv/include/_stdint.h b/sys/riscv/include/_stdint.h
--- a/sys/riscv/include/_stdint.h
+++ b/sys/riscv/include/_stdint.h
@@ -164,7 +164,6 @@
#define PTRDIFF_WIDTH INT64_WIDTH
#define SIG_ATOMIC_WIDTH INT64_WIDTH
#define SIZE_WIDTH INT64_WIDTH
-#define WCHAR_WIDTH INT32_WIDTH
#define WINT_WIDTH INT32_WIDTH
#endif /* __ISO_C_VISIBLE >= 2023 */
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -129,6 +129,8 @@
*/
#include <machine/_types.h>
+#define __WCHAR_WIDTH 32 /* number of bits in a wchar_t */
+
/*
* Standard type definitions.
*/
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h
--- a/sys/sys/stdint.h
+++ b/sys/sys/stdint.h
@@ -68,6 +68,9 @@
/* Limits of wchar_t. */
#define WCHAR_MIN __WCHAR_MIN
#define WCHAR_MAX __WCHAR_MAX
+#if __ISO_C_VISIBLE >= 2023
+#define WCHAR_WIDTH __WCHAR_WIDTH
+#endif
#if __EXT1_VISIBLE
/* ISO/IEC 9899:2011 K.3.4.4 */
diff --git a/sys/x86/include/_stdint.h b/sys/x86/include/_stdint.h
--- a/sys/x86/include/_stdint.h
+++ b/sys/x86/include/_stdint.h
@@ -207,7 +207,6 @@
#define SIG_ATOMIC_WIDTH INT32_WIDTH
#define SIZE_WIDTH INT32_WIDTH
#endif
-#define WCHAR_WIDTH INT32_WIDTH
#define WINT_WIDTH INT32_WIDTH
#endif /* __ISO_C_VISIBLE >= 2023 */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 3:21 PM (12 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38365999
Default Alt Text
D59385.id185912.diff (2 KB)
Attached To
Mode
D59385: libc: Add WCHAR_WIDTH in <wchar.h> as well
Attached
Detach File
Event Timeline
Log In to Comment