diff options
Diffstat (limited to 'src/util/StringAPI.hxx')
-rw-r--r-- | src/util/StringAPI.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/StringAPI.hxx b/src/util/StringAPI.hxx index 334e9dee7..08087f5f8 100644 --- a/src/util/StringAPI.hxx +++ b/src/util/StringAPI.hxx @@ -101,6 +101,19 @@ UnsafeCopyString(char *dest, const char *src) strcpy(dest, src); } +gcc_nonnull_all +static inline char * +UnsafeCopyStringP(char *dest, const char *src) +{ +#if defined(WIN32) || defined(__BIONIC__) + /* emulate stpcpy() */ + UnsafeCopyString(dest, src); + return dest + StringLength(dest); +#else + return stpcpy(dest, src); +#endif +} + /** * Checks whether #a and #b are equal. */ |