diff options
author | Nadim Taha <ntaha@google.com> | 2017-02-02 18:48:03 -0800 |
---|---|---|
committer | Nadim Taha <ntaha@chromium.org> | 2017-02-17 01:46:31 +0000 |
commit | 69c3fc2378ee9026277c1cbaf6e8aff0b99ecf46 (patch) | |
tree | 548d9660cb450bdb29cb08be0fdaff740854d276 /include | |
parent | 61a5649e302915c617f4f70a1b3211805f363ed8 (diff) | |
download | chrome-ec-69c3fc2378ee9026277c1cbaf6e8aff0b99ecf46.tar.gz |
builtin: Expands string.h / stdint.h
Declares UINT8_MAX, INT8_MAX and defines strnlen(), strncpy(), strncmp() &
memchr(). Needed by a module I'm integrating into cr51.
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I894b0297216df1b945b36fc77cd3bc5c4ef8aa2b
Signed-off-by: Nadim Taha <ntaha@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/436786
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index e031148e45..62c9bceb25 100644 --- a/include/util.h +++ b/include/util.h @@ -69,9 +69,13 @@ int memcmp(const void *s1, const void *s2, size_t len); void *memcpy(void *dest, const void *src, size_t len); __visible void *memset(void *dest, int c, size_t len); void *memmove(void *dest, const void *src, size_t len); +void *memchr(const void *buffer, int c, size_t n); int strcasecmp(const char *s1, const char *s2); int strncasecmp(const char *s1, const char *s2, size_t size); int strlen(const char *s); +size_t strnlen(const char *s, size_t maxlen); +char *strncpy(char *dest, const char *src, size_t n); +int strncmp(const char *s1, const char *s2, size_t n); /* Like strtol(), but for integers. */ int strtoi(const char *nptr, char **endptr, int base); |