Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160481720
D53830.id167325.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D53830.id167325.diff
View Options
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
@@ -153,6 +153,29 @@
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
+#if __ISO_C_VISIBLE >= 2023
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.2 Widths of specified-width integer types
+ */
+#define INT_FAST8_WIDTH INT32_WIDTH
+#define INT_FAST16_WIDTH INT32_WIDTH
+#define INT_FAST32_WIDTH INT32_WIDTH
+#define INT_FAST64_WIDTH INT64_WIDTH
+#define INTPTR_WIDTH INT32_WIDTH
+#define INTMAX_WIDTH INT64_WIDTH
+
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.3 Width of other integer types
+ */
+#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 */
+
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_MACHINE__STDINT_H_ */
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
@@ -155,6 +155,29 @@
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
+#if __ISO_C_VISIBLE >= 2023
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.2 Widths of specified-width integer types
+ */
+#define INT_FAST8_WIDTH INT32_WIDTH
+#define INT_FAST16_WIDTH INT32_WIDTH
+#define INT_FAST32_WIDTH INT32_WIDTH
+#define INT_FAST64_WIDTH INT64_WIDTH
+#define INTPTR_WIDTH INT64_WIDTH
+#define INTMAX_WIDTH INT64_WIDTH
+
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.3 Width of other integer types
+ */
+#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 */
+
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_MACHINE__STDINT_H_ */
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
@@ -195,6 +195,39 @@
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
+#if __ISO_C_VISIBLE >= 2023
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.2 Widths of specified-width integer types
+ */
+#define INT_FAST8_WIDTH INT32_WIDTH
+#define INT_FAST16_WIDTH INT32_WIDTH
+#define INT_FAST32_WIDTH INT32_WIDTH
+#define INT_FAST64_WIDTH INT64_WIDTH
+#ifdef __LP64__
+#define INTPTR_WIDTH INT64_WIDTH
+#else
+#define INTPTR_WIDTH INT32_WIDTH
+#endif
+#define INTMAX_WIDTH INT64_WIDTH
+
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.3 Width of other integer types
+ */
+#ifdef __LP64__
+#define PTRDIFF_WIDTH INT64_WIDTH
+#define SIG_ATOMIC_WIDTH INT64_WIDTH
+#define SIZE_WIDTH INT64_WIDTH
+#else
+#define PTRDIFF_WIDTH INT32_WIDTH
+#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 */
+
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_MACHINE__STDINT_H_ */
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
@@ -151,6 +151,29 @@
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
+#if __ISO_C_VISIBLE >= 2023
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.2 Widths of specified-width integer types
+ */
+#define INT_FAST8_WIDTH INT32_WIDTH
+#define INT_FAST16_WIDTH INT32_WIDTH
+#define INT_FAST32_WIDTH INT32_WIDTH
+#define INT_FAST64_WIDTH INT64_WIDTH
+#define INTPTR_WIDTH INT64_WIDTH
+#define INTMAX_WIDTH INT64_WIDTH
+
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.3 Width of other integer types
+ */
+#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 */
+
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_MACHINE__STDINT_H_ */
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h
--- a/sys/sys/stdint.h
+++ b/sys/sys/stdint.h
@@ -73,4 +73,33 @@
#endif
#endif /* __EXT1_VISIBLE */
+#if __ISO_C_VISIBLE >= 2023
+#define INT8_WIDTH 8
+#define UINT8_WIDTH 8
+#define INT_LEAST8_WIDTH 8
+#define UINT_LEAST8_WIDTH 8
+#define UINT_FAST8_WIDTH INT_FAST8_WIDTH
+
+#define INT16_WIDTH 16
+#define UINT16_WIDTH 16
+#define INT_LEAST16_WIDTH 16
+#define UINT_LEAST16_WIDTH 16
+#define UINT_FAST16_WIDTH INT_FAST16_WIDTH
+
+#define INT32_WIDTH 32
+#define UINT32_WIDTH 32
+#define INT_LEAST32_WIDTH 32
+#define UINT_LEAST32_WIDTH 32
+#define UINT_FAST32_WIDTH INT_FAST32_WIDTH
+
+#define INT64_WIDTH 64
+#define UINT64_WIDTH 64
+#define INT_LEAST64_WIDTH 64
+#define UINT_LEAST64_WIDTH 64
+#define UINT_FAST64_WIDTH INT_FAST64_WIDTH
+
+#define UINTMAX_WIDTH INTMAX_WIDTH
+#define UINTPTR_WIDTH INTPTR_WIDTH
+#endif /* __ISO_C_VISIBLE >= 2023 */
+
#endif /* !_SYS_STDINT_H_ */
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
@@ -184,6 +184,39 @@
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
+#if __ISO_C_VISIBLE >= 2023
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.2 Widths of specified-width integer types
+ */
+#define INT_FAST8_WIDTH INT32_WIDTH
+#define INT_FAST16_WIDTH INT32_WIDTH
+#define INT_FAST32_WIDTH INT32_WIDTH
+#define INT_FAST64_WIDTH INT64_WIDTH
+#ifdef __LP64__
+#define INTPTR_WIDTH INT64_WIDTH
+#else
+#define INTPTR_WIDTH INT32_WIDTH
+#endif
+#define INTMAX_WIDTH INT64_WIDTH
+
+/*
+ * ISO/IEC 9899:2023
+ * 7.22.3 Width of other integer types
+ */
+#ifdef __LP64__
+#define PTRDIFF_WIDTH INT64_WIDTH
+#define SIG_ATOMIC_WIDTH INT64_WIDTH
+#define SIZE_WIDTH INT64_WIDTH
+#else
+#define PTRDIFF_WIDTH INT32_WIDTH
+#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 */
+
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_MACHINE__STDINT_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jun 25, 11:30 PM (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34332443
Default Alt Text
D53830.id167325.diff (6 KB)
Attached To
Mode
D53830: sys/stdint.h: add C23 _WIDTH macros
Attached
Detach File
Event Timeline
Log In to Comment