Page MenuHomeFreeBSD

D59272.diff
No OneTemporary

D59272.diff

diff --git a/include/assert.h b/include/assert.h
--- a/include/assert.h
+++ b/include/assert.h
@@ -71,7 +71,9 @@
#ifndef _ASSERT_H_
#define _ASSERT_H_
+#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE
#define __STDC_VERSION_ASSERT_H__ 202311L
+#endif
/*
* Static assertions. In principle we could define static_assert for
diff --git a/include/limits.h b/include/limits.h
--- a/include/limits.h
+++ b/include/limits.h
@@ -32,10 +32,12 @@
#ifndef _LIMITS_H_
#define _LIMITS_H_
-#define __STDC_VERSION_LIMITS_H__ 202311L
-
#include <sys/cdefs.h>
+#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE
+#define __STDC_VERSION_LIMITS_H__ 202311L
+#endif
+
#if __POSIX_VISIBLE
#define _POSIX_ARG_MAX 4096
#define _POSIX_LINK_MAX 8
diff --git a/include/setjmp.h b/include/setjmp.h
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -37,10 +37,12 @@
#ifndef _SETJMP_H_
#define _SETJMP_H_
-#define __STDC_VERSION_SETJMP_H__ 202311L
-
#include <sys/cdefs.h>
+#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE
+#define __STDC_VERSION_SETJMP_H__ 202311L
+#endif
+
/* The size of the jmp_buf is machine dependent: */
#include <machine/setjmp.h>
diff --git a/include/stdio.h b/include/stdio.h
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -35,12 +35,14 @@
#ifndef _STDIO_H_
#define _STDIO_H_
-#define __STDC_VERSION_STDIO_H__ 202311L
-
#include <sys/cdefs.h>
#include <sys/_null.h>
#include <sys/_types.h>
+#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE
+#define __STDC_VERSION_STDIO_H__ 202311L
+#endif
+
__NULLABILITY_PRAGMA_PUSH
typedef __off_t fpos_t;
diff --git a/include/time.h b/include/time.h
--- a/include/time.h
+++ b/include/time.h
@@ -37,13 +37,15 @@
#ifndef _TIME_H_
#define _TIME_H_
-#define __STDC_VERSION_TIME_H__ 202311L
-
#include <sys/cdefs.h>
#include <sys/_null.h>
#include <sys/_types.h>
#include <sys/_clock_id.h>
+#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE
+#define __STDC_VERSION_TIME_H__ 202311L
+#endif
+
#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE
/*
* Frequency of the clock ticks reported by times(). Deprecated - use
diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h
--- a/sys/sys/stdatomic.h
+++ b/sys/sys/stdatomic.h
@@ -30,11 +30,13 @@
#ifndef _STDATOMIC_H_
#define _STDATOMIC_H_
-#define __STDC_VERSION_STDATOMIC_H__ 202311L
-
#include <sys/cdefs.h>
#include <sys/_types.h>
+#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE
+#define __STDC_VERSION_STDATOMIC_H__ 202311L
+#endif
+
#if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \
defined(__clang__)
#define __CLANG_ATOMICS

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 31, 4:24 PM (7 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37699533
Default Alt Text
D59272.diff (2 KB)

Event Timeline