5 #define ALIGN (sizeof(size_t))
6 #define ONES ((size_t)-1/UCHAR_MAX)
7 #define HIGHS (ONES * (UCHAR_MAX/2+1))
8 #define HASZERO(x) ((x)-ONES & ~(x) & HIGHS)
10 size_t strlen(const char *s
)
14 typedef size_t __attribute__((__may_alias__
)) word
;
16 for (; (uintptr_t)s
% ALIGN
; s
++) if (!*s
) return s
-a
;
17 for (w
= (const void *)s
; !HASZERO(*w
); w
++);