Restore strict header checking

This commit is contained in:
Justine Tunney 2022-08-13 16:02:01 -07:00
parent b212f49ef4
commit ad775a75b8
16 changed files with 43 additions and 41 deletions

View file

@ -16,7 +16,10 @@
#include "third_party/libcxx/stdlib.h"
#include "libc/mem/fmt.h"
#include "libc/str/unicode.h"
#include "libc/fmt/fmt.h"
#include "libc/str/locale.h"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/__locale"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header

View file

@ -1152,6 +1152,7 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
!defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)) \
|| defined(_LIBCPP_HAS_NO_THREADS)
# define _LIBCPP_HAS_NO_ATOMIC_HEADER
# define _LIBCPP_ATOMIC_FLAG_TYPE bool
#else
# ifndef _LIBCPP_ATOMIC_FLAG_TYPE
# define _LIBCPP_ATOMIC_FLAG_TYPE bool

View file

@ -21,16 +21,6 @@
#pragma GCC system_header
#endif
#ifdef _LIBCPP_HAS_NO_THREADS
# error <atomic> is not supported on this single threaded system
#endif
#ifdef _LIBCPP_HAS_NO_ATOMIC_HEADER
# error <atomic> is not implemented
#endif
#ifdef kill_dependency
# error C++ standard library is incompatible with <stdatomic.h>
#endif
#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
_LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
__m == memory_order_acquire || \

View file

@ -36,6 +36,7 @@ lconv* localeconv();
*/
#include "third_party/libcxx/__config"
#include "libc/str/unicode.h"
#include "libc/str/locale.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

View file

@ -13,6 +13,13 @@
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cwctype"
#include "third_party/libcxx/wchar.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/time/struct/tm.h"
#include "libc/stdio/stdio.h"
#include "libc/stdio/stdio.h"
#include "libc/fmt/conv.h"
#include "third_party/gdtoa/gdtoa.h"
#include "libc/time/struct/tm.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

View file

@ -34,9 +34,7 @@
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#ifdef _LIBCPP_HAS_NO_THREADS
#error <thread> is not supported on this single threaded system
#else // !_LIBCPP_HAS_NO_THREADS
#ifndef _LIBCPP_HAS_NO_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD