Replace COSMO define with _COSMO_SOURCE

This change might cause ABI breakages for /opt/cosmos. It's needed to
help us better conform to header declaration practices.
This commit is contained in:
Justine Tunney 2023-08-13 20:31:27 -07:00
parent a033b65a33
commit c776a32f75
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
238 changed files with 858 additions and 1069 deletions

View file

@ -1,13 +1,13 @@
#ifdef _ASSERT_H
#undef _ASSERT_H
#undef assert
#ifdef COSMO
#ifdef _COSMO_SOURCE
#undef unassert
#undef npassert
#ifndef NDEBUG
#undef __assert_macro
#endif /* NDEBUG */
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
#endif /* _ASSERT_H */
#ifndef _ASSERT_H
@ -27,7 +27,7 @@ void __assert_fail(const char *, const char *, int) relegated;
#define static_assert _Static_assert
#endif
#ifdef COSMO
#ifdef _COSMO_SOURCE
extern bool __assert_disable;
#ifndef NDEBUG
#define unassert(x) __assert_macro(x, #x)
@ -56,7 +56,7 @@ extern bool __assert_disable;
(void)0; \
})
#endif /* NDEBUG */
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
COSMOPOLITAN_C_END_
#endif /* _ASSERT_H */