Windows: rk_wcsdup allocator

patchset 3fe5572840 should have
replaced wcsdup().

Change-Id: Ib1e09477b430525267c6c930d7c4ab29858a68bb
This commit is contained in:
Jeffrey Altman
2012-07-20 09:40:22 -04:00
parent 0686ad5ece
commit b8a53329fc
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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);
}