diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index eeb1e083a..bf05de3d5 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -359,6 +359,7 @@ rk_vsnprintf (char *str, size_t sz, const char *format, va_list args); #define malloc rk_malloc #define realloc rk_realloc #define strdup rk_strdup +#define wcsdup rk_wcsdup #endif ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL @@ -376,6 +377,9 @@ rk_realloc(void *, size_t); ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL rk_strdup(const char *); +ROKEN_LIB_FUNCTION unsigned short * ROKEN_LIB_CALL +rk_wcsdup(const unsigned short *); + #endif /* _MSC_VER */ #ifdef HAVE_WINSOCK diff --git a/lib/roken/win32_alloc.c b/lib/roken/win32_alloc.c index e08312305..40fe0f4fe 100644 --- a/lib/roken/win32_alloc.c +++ b/lib/roken/win32_alloc.c @@ -34,6 +34,7 @@ #undef malloc #undef free #undef strdup +#undef wcsdup /* * Windows executables and dlls suffer when memory is @@ -67,3 +68,9 @@ rk_strdup(const char *str) { return strdup( str); } + +ROKEN_LIB_FUNCTION unsigned short * ROKEN_LIB_CALL +rk_wcsdup(const unsigned short *str) +{ + return wcsdup( str); +}