diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/stdint.h | 7 | ||||
-rw-r--r-- | builtin/string.h | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/builtin/stdint.h b/builtin/stdint.h index f80a46f1a5..b82268b409 100644 --- a/builtin/stdint.h +++ b/builtin/stdint.h @@ -23,6 +23,13 @@ typedef unsigned int uintptr_t; typedef uint8_t uint_least8_t; +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127U) +#endif + #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif diff --git a/builtin/string.h b/builtin/string.h index 50a6d54664..21159a5eef 100644 --- a/builtin/string.h +++ b/builtin/string.h @@ -14,5 +14,10 @@ int memcmp(const void *s1, const void *s2, size_t len); void *memcpy(void *dest, const void *src, size_t len); void *memmove(void *dest, const void *src, size_t n); void *memset(void *dest, int c, size_t len); +void *memchr(const void *buffer, int c, size_t n); + +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); #endif /* __CROS_EC_STRINGS_H__ */ |