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

@ -19,5 +19,7 @@
#include "libc/str/str.h"
wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, size_t count) {
return memcpy(dest, src, count * sizeof(wchar_t));
size_t bytes;
if (__builtin_mul_overflow(count, sizeof(wchar_t), &bytes)) bytes = -1;
return memcpy(dest, src, bytes);
}