Upstream: not yet, need to find a proper patch. --- ./mednafen/snes/src/lib/nall/string/strl.hpp.orig 2020-04-05 13:30:05.865697614 +0200 +++ ./mednafen/snes/src/lib/nall/string/strl.hpp 2020-04-05 13:30:12.735686081 +0200 @@ -1,48 +0,0 @@ -#ifndef NALL_STRING_STRL_HPP -#define NALL_STRING_STRL_HPP - -//strlcpy, strlcat based on OpenBSD implementation by Todd C. Miller - -//return = strlen(src) -size_t strlcpy(char *dest, const char *src, size_t length) { - char *d = dest; - const char *s = src; - size_t n = length; - - if(n) { - while(--n && (*d++ = *s++)); //copy as many bytes as possible, or until null terminator reached - } - - if(!n) { - if(length) *d = 0; - while(*s++); //traverse rest of s, so that s - src == strlen(src) - } - - return (s - src - 1); //return length of copied string, sans null terminator -} - -//return = strlen(src) + min(length, strlen(dest)) -size_t strlcat(char *dest, const char *src, size_t length) { - char *d = dest; - const char *s = src; - size_t n = length; - - while(n-- && *d) d++; //find end of dest - size_t dlength = d - dest; - n = length - dlength; //subtract length of dest from maximum string length - - if(!n) return dlength + strlen(s); - - while(*s) { - if(n != 1) { - *d++ = *s; - n--; - } - s++; - } - *d = 0; - - return dlength + (s - src); //return length of resulting string, sans null terminator -} - -#endif --- ./mednafen/snes/src/lib/nall/string/base.hpp.orig 2020-04-05 13:25:44.896135748 +0200 +++ ./mednafen/snes/src/lib/nall/string/base.hpp 2020-04-05 13:25:57.799447417 +0200 @@ -34,8 +34,6 @@ inline bool match(const char *pattern, const char *str); inline bool strint (const char *str, int &result); inline bool strmath(const char *str, int &result); -inline size_t strlcpy(char *dest, const char *src, size_t length); -inline size_t strlcat(char *dest, const char *src, size_t length); inline char* ltrim(char *str, const char *key = " "); inline char* rtrim(char *str, const char *key = " "); inline char* trim (char *str, const char *key = " ");