From 98aaf8317b74414afa78078bc056670f46c45f41 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Tue, 18 Jun 2019 14:54:02 -0700 Subject: lib: Include helper libc functions directly in libsbi. libsbi needs some of the custom libc functions. It should be directly included in libsbi instead of platform specific libraries. Signed-off-by: Atish Patra Acked-by: Anup Patel --- include/sbi/string.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 include/sbi/string.h (limited to 'include') diff --git a/include/sbi/string.h b/include/sbi/string.h new file mode 100644 index 0000000..8259ef5 --- /dev/null +++ b/include/sbi/string.h @@ -0,0 +1,39 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Western Digital Corporation or its affiliates. + * + * Authors: + * Atish Patra + */ + +#ifndef __STRING_H__ +#define __STRING_H__ + +#include + +int strcmp(const char *a, const char *b); + +size_t strlen(const char *str); + +size_t strnlen(const char *str, size_t count); + +char *strcpy(char *dest, const char *src); + +char *strncpy(char *dest, const char *src, size_t count); + +char *strchr(const char *s, int c); + +char *strrchr(const char *s, int c); + +void *memset(void *s, int c, size_t count); + +void *memcpy(void *dest, const void *src, size_t count); + +void *memmove(void *dest, const void *src, size_t count); + +int memcmp(const void *s1, const void *s2, size_t count); + +void *memchr(const void *s, int c, size_t count); + +#endif -- cgit v1.1