mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-04-26 01:35:47 +00:00
hv: lib: Add several missing standard string/memory APIs
Integrating libfdt requires the presence of these APIs. Tracked-On: #8838 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Acked-by: Wang Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -32,6 +32,8 @@ void memcpy_backwards(void *d, const void *s, size_t slen);
|
||||
#endif
|
||||
|
||||
int32_t memcpy_s(void *d, size_t dmax, const void *s, size_t slen);
|
||||
|
||||
int memcmp(const void *s1, const void *s2, size_t count);
|
||||
void *memmove(void *d, const void *s, size_t slen);
|
||||
void *memchr(const void *s, int c, size_t slen);
|
||||
|
||||
#endif /* MEMORY_LIB_H */
|
||||
|
||||
@@ -38,11 +38,16 @@ static inline bool is_eol(char c)
|
||||
int32_t strcmp(const char *s1_arg, const char *s2_arg);
|
||||
int32_t strncmp(const char *s1_arg, const char *s2_arg, size_t n_arg);
|
||||
int32_t strncpy_s(char *d, size_t dmax, const char *s, size_t slen);
|
||||
char *strchr(char *s_arg, char ch);
|
||||
char *strchr(const char *s_arg, char ch);
|
||||
size_t strnlen_s(const char *str_arg, size_t maxlen_arg);
|
||||
int64_t strtol_deci(const char *nptr);
|
||||
uint64_t strtoul_hex(const char *nptr);
|
||||
uint64_t strtoul(const char * nptr, char **endptr, int base);
|
||||
char *strstr_s(const char *str1, size_t maxlen1, const char *str2, size_t maxlen2);
|
||||
int32_t strncat_s(char *dest, size_t dmax, const char *src, size_t slen);
|
||||
size_t strlen(const char *str);
|
||||
size_t strnlen(const char *str, size_t count);
|
||||
char *strrchr(const char *s, char ch);
|
||||
char *strcpy(char *d, const char *s);
|
||||
|
||||
#endif /* RTL_H */
|
||||
|
||||
@@ -24,6 +24,7 @@ typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
typedef signed long int64_t;
|
||||
typedef unsigned int size_t;
|
||||
typedef __builtin_va_list va_list;
|
||||
|
||||
Reference in New Issue
Block a user