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

@ -17,7 +17,7 @@ int settimeofday(const struct timeval *, const struct timezone *);
int lutimes(const char *, const struct timeval[2]);
int utimes(const char *, const struct timeval[2]);
#ifdef COSMO
#ifdef _COSMO_SOURCE
/* cosmopolitan libc's non-posix timevals library
removed by default due to emacs codebase clash */
#define timeval_zero ((struct timeval){0})
@ -43,7 +43,7 @@ static inline bool timeval_iszero(struct timeval __tv) {
static inline bool timeval_isvalid(struct timeval __tv) {
return __tv.tv_sec >= 0 && __tv.tv_usec < 1000000ull;
}
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */