[libcxx-commits] [libcxx] [libc++] stddef.h needs to #include_next for the new clang __need_ macros (PR #86252)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 28 13:24:24 PDT 2024


================
@@ -7,16 +7,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(__need_ptrdiff_t) || defined(__need_size_t) || defined(__need_wchar_t) || defined(__need_NULL) ||          \
-    defined(__need_wint_t)
+#if defined(__need_ptrdiff_t) || defined(__need_size_t) || defined(__need_rsize_t) || defined(__need_wchar_t) ||       \
----------------
ldionne wrote:

The answer we're getting from the Darwin folks is that they can't find a historical reason for it. Basically our current understanding is that on Darwin at least, the most naive implementation (without any `__need_FOO` macros) *should* work. Or at least it would be intended to work.

I don't know about Linuxes though. At the very least, as far as libc++ is concerned, I am quite tempted to close this PR and go with https://github.com/llvm/llvm-project/pull/86843 instead.

https://github.com/llvm/llvm-project/pull/86252


More information about the libcxx-commits mailing list