crt: add C23 string.h and memory.h functions
C23 adds the following functions to string.h and memory.h:
memset_explicit(void *s, int c, size_t n)
memccpy(void *dest, const void *src, int c, size_t n)
strdup(const char *s)
strndup(const char *s, size_t n)
Add a libmingwex implementation of strndup and declare it in string.h for C23.
Also expose strdup and memccpy as C23 functions independently of NO_OLDNAMES,
while keeping the deprecated oldname declarations for pre-C23 builds.
I didn't implement memset_explicit because I am not really sure how to.
Signed-off-by: LIU Hao <lh_mouse@126.com>
4 files changed