diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2014-03-16 03:55:41 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2014-03-28 23:06:17 -0400 |
commit | fc1a3e285393446ef3cc2fad07b2611bf2da80d4 (patch) | |
tree | 1b29bee3eb415cac3014dd76a42b05ad93d639d0 /system | |
parent | f546d9a039d8b1ead4f6b5843e97faf8b4944a70 (diff) |
Migrate to using musl 0.9.13 strnlen for better asm.js performance.
Diffstat (limited to 'system')
-rw-r--r-- | system/lib/libc/musl/src/string/strnlen.c | 7 | ||||
-rw-r--r-- | system/lib/libcextra.symbols | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/strnlen.c b/system/lib/libc/musl/src/string/strnlen.c new file mode 100644 index 00000000..6442eb79 --- /dev/null +++ b/system/lib/libc/musl/src/string/strnlen.c @@ -0,0 +1,7 @@ +#include <string.h> + +size_t strnlen(const char *s, size_t n) +{ + const char *p = memchr(s, 0, n); + return p ? p-s : n; +} diff --git a/system/lib/libcextra.symbols b/system/lib/libcextra.symbols index 94cd79be..14b6906e 100644 --- a/system/lib/libcextra.symbols +++ b/system/lib/libcextra.symbols @@ -120,6 +120,7 @@ T strlcpy T strncasecmp_l T strncat + T strnlen T strsep T strspn T strverscmp |