Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177513316
D44665.1794595520.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D44665.1794595520.diff
View Options
diff --git a/include/stddef.h b/include/stddef.h
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -32,6 +32,9 @@
#ifndef _STDDEF_H_
#define _STDDEF_H_
+#ifndef __STDC_VERSION_STDDEF_H__
+#define __STDC_VERSION_STDDEF_H__ 202311L
+
#include <sys/cdefs.h>
#include <sys/_null.h>
#include <sys/_types.h>
@@ -78,4 +81,10 @@
#endif
#endif /* __EXT1_VISIBLE */
+#if __STDC_VERSION__ >= 202311L
+#define unreachable() __unreachable()
+#endif
+
+#endif /* __STDC_VERSION_STDDEF_H__ */
+
#endif /* _STDDEF_H_ */
diff --git a/sys/sys/_null.h b/sys/sys/_null.h
--- a/sys/sys/_null.h
+++ b/sys/sys/_null.h
@@ -29,7 +29,11 @@
#ifndef NULL
#if !defined(__cplusplus)
+#if __STDC_VERSION__ >= 202311L
+#define NULL nullptr
+#else /* __STDC_VERSION__ < 202311L */
#define NULL ((void *)0)
+#endif /* __STDC_VERSION__ >= 202311L */
#else
#if __cplusplus >= 201103L
#define NULL nullptr
@@ -44,4 +48,8 @@
#endif /* __GNUG__ */
#endif /* !__cplusplus */
+#if __STDC_VERSION__ >= 202311L
+typedef typeof_unqual(nullptr) nullptr_t;
+#endif
+
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 13, 6:45 PM (15 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41706793
Default Alt Text
D44665.1794595520.diff (1 KB)
Attached To
Mode
D44665: stddef.h: Update for C23
Attached
Detach File
Event Timeline