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

Ian Anderson via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 27 09:19:27 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) ||       \
----------------
ian-twilightcoder wrote:

The problem is that some headers need to declare _just_ size_t, and it's a problem if _anything_ else gets declared. The way they do that is by setting `__need_size_t` and including stddef.h. I think it's for POSIX reasons but I'm not 100% why it's so important for people to be able to only see pieces of stdarg and stddef.

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


More information about the libcxx-commits mailing list