[libc++] Remove workarounds for systems that used to require __need_XXX macros
Libc++ tried accomodating systems that need to be able to define various
__need_FOO macros before including C library headers, however it does not
appear to be needed anymore in most cases. Indeed, glibc used to use that
system to conditionally provide definitions, however almost all instances
of these macros have been removed from glibc years ago.
I think the next step would be to also fix Clang's own builtin headers
to stop needing these macros.
Differential Revision: https://reviews.llvm.org/D131425
NOKEYCHECK=True
GitOrigin-RevId: 119cef40d18c48240854edc553dca61c4e9fdf27
diff --git a/include/stdlib.h b/include/stdlib.h
index 64581b6..1c990c1 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -7,15 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(__need_malloc_and_calloc)
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
-
-#include_next <stdlib.h>
-
-#elif !defined(_LIBCPP_STDLIB_H)
+#ifndef _LIBCPP_STDLIB_H
#define _LIBCPP_STDLIB_H
/*