7 #define ALIGN (sizeof(size_t))
8 #define ONES ((size_t)-1/UCHAR_MAX)
9 #define HIGHS (ONES * (UCHAR_MAX/2+1))
10 #define HASZERO(x) ((x)-ONES & ~(x) & HIGHS)
12 char *__stpcpy(char *restrict d, const char *restrict s)
17 if ((uintptr_t)s % ALIGN == (uintptr_t)d % ALIGN) {
18 for (; (uintptr_t)s % ALIGN; s++, d++)
19 if (!(*d=*s)) return d;
20 wd=(void *)d; ws=(const void *)s;
21 for (; !HASZERO(*ws); *wd++ = *ws++);
22 d=(void *)wd; s=(const void *)ws;
24 for (; (*d=*s); s++, d++);
29 weak_alias(__stpcpy, stpcpy);