Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140021916
D44665.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44665.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
Sat, Dec 20, 4:06 AM (2 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27091667
Default Alt Text
D44665.diff (1 KB)
Attached To
Mode
D44665: stddef.h: Update for C23
Attached
Detach File
Event Timeline
Log In to Comment