Add more missing C / C++ headers

This commit is contained in:
Justine Tunney 2022-09-04 04:53:52 -07:00
parent b9dc74b672
commit 8dd4ec68d0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
152 changed files with 30711 additions and 6267 deletions

View file

@ -64,10 +64,14 @@ noasan static inline const wchar_t *wmemrchr_sse(const wchar_t *s, wchar_t c,
* @return is pointer to first instance of c or NULL if not found
* @asyncsignalsafe
*/
void *wmemrchr(const void *s, wchar_t c, size_t n) {
void *wmemrchr(const wchar_t *s, wchar_t c, size_t n) {
size_t bytes;
const void *r;
if (!IsTiny() && X86_HAVE(SSE)) {
if (IsAsan()) __asan_verify(s, n * 4);
if (IsAsan()) {
if (__builtin_mul_overflow(n, sizeof(wchar_t), &bytes)) bytes = -1;
__asan_verify(s, bytes);
}
r = wmemrchr_sse(s, c, n);
} else {
r = wmemrchr_pure(s, c, n);