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

@ -23,15 +23,9 @@
* @asyncsignalsafe
*/
wchar_t *wmemset(wchar_t *p, wchar_t c, size_t n) {
size_t i = 0;
if (n >= 4) {
wchar_t v __attribute__((__vector_size__(16))) = {c, c, c, c};
do {
__builtin_memcpy(p + i, &v, 16);
} while ((i += 4) + 4 <= n);
}
while (i < n) {
p[i++] = c;
size_t i;
for (i = 0; i < n; ++i) {
p[i] = c;
}
return p;
}