Windows: rk_strdup allocator
patchset 3fe5572840
should have
replaced strdup().
Change-Id: I7af7b3e953e379fb23fccd9fa7a9e02c354c2dc4
This commit is contained in:
@@ -358,6 +358,7 @@ rk_vsnprintf (char *str, size_t sz, const char *format, va_list args);
|
|||||||
#define free rk_free
|
#define free rk_free
|
||||||
#define malloc rk_malloc
|
#define malloc rk_malloc
|
||||||
#define realloc rk_realloc
|
#define realloc rk_realloc
|
||||||
|
#define strdup rk_strdup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
|
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
|
||||||
@@ -372,6 +373,9 @@ rk_malloc(size_t);
|
|||||||
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
|
ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL
|
||||||
rk_realloc(void *, size_t);
|
rk_realloc(void *, size_t);
|
||||||
|
|
||||||
|
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
|
||||||
|
rk_strdup(const char *);
|
||||||
|
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
#ifdef HAVE_WINSOCK
|
#ifdef HAVE_WINSOCK
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#undef calloc
|
#undef calloc
|
||||||
#undef malloc
|
#undef malloc
|
||||||
#undef free
|
#undef free
|
||||||
|
#undef strdup
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Windows executables and dlls suffer when memory is
|
* Windows executables and dlls suffer when memory is
|
||||||
@@ -60,3 +61,9 @@ rk_malloc(size_t size)
|
|||||||
{
|
{
|
||||||
return malloc( size);
|
return malloc( size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL
|
||||||
|
rk_strdup(const char *str)
|
||||||
|
{
|
||||||
|
return strdup( str);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user