Windows: rk_wcsdup allocator
patchset 3fe5572840
should have
replaced wcsdup().
Change-Id: Ib1e09477b430525267c6c930d7c4ab29858a68bb
This commit is contained in:
@@ -359,6 +359,7 @@ rk_vsnprintf (char *str, size_t sz, const char *format, va_list args);
|
|||||||
#define malloc rk_malloc
|
#define malloc rk_malloc
|
||||||
#define realloc rk_realloc
|
#define realloc rk_realloc
|
||||||
#define strdup rk_strdup
|
#define strdup rk_strdup
|
||||||
|
#define wcsdup rk_wcsdup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
|
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
|
||||||
@@ -376,6 +377,9 @@ rk_realloc(void *, size_t);
|
|||||||
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
|
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
|
||||||
rk_strdup(const char *);
|
rk_strdup(const char *);
|
||||||
|
|
||||||
|
ROKEN_LIB_FUNCTION unsigned short * ROKEN_LIB_CALL
|
||||||
|
rk_wcsdup(const unsigned short *);
|
||||||
|
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
#ifdef HAVE_WINSOCK
|
#ifdef HAVE_WINSOCK
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#undef malloc
|
#undef malloc
|
||||||
#undef free
|
#undef free
|
||||||
#undef strdup
|
#undef strdup
|
||||||
|
#undef wcsdup
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Windows executables and dlls suffer when memory is
|
* Windows executables and dlls suffer when memory is
|
||||||
@@ -67,3 +68,9 @@ rk_strdup(const char *str)
|
|||||||
{
|
{
|
||||||
return strdup( str);
|
return strdup( str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ROKEN_LIB_FUNCTION unsigned short * ROKEN_LIB_CALL
|
||||||
|
rk_wcsdup(const unsigned short *str)
|
||||||
|
{
|
||||||
|
return wcsdup( str);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user