reactos/lib/3rdparty/libwine/debug_ros.c
Cameron Gutman 29fa274d6d - Create another branch for networking fixes
- TSVN choked repeatedly when attempting to merge ~9000 revs into the branch (tried 3 times on 2 different computers)
 - If someone wants to delete aicom-network-fixes, they are welcome to
 - Lesson learned: Letting a branch get thousands of revs out of date is a horrible idea

svn path=/branches/aicom-network-branch/; revision=44353
2009-12-02 03:23:19 +00:00

34 lines
670 B
C

/* The use of these four functions was creating unwanted imports
* from msvcrt.dll in kernel32.dll. */
#define malloc libwine_malloc
#define free libwine_free
#define realloc libwine_realloc
#define _strdup libwine__strdup
#include "debug.c"
__MINGW_ATTRIB_MALLOC
void *malloc(size_t size)
{
return LocalAlloc(0, size);
}
void free(void *ptr)
{
LocalFree(ptr);
}
void *realloc(void *ptr, size_t size)
{
if (ptr == NULL) return malloc(size);
return LocalReAlloc(ptr, size, LMEM_MOVEABLE);
}
__MINGW_ATTRIB_MALLOC
char *_strdup(const char *str)
{
char *newstr = malloc(strlen(str) + 1);
if (newstr) strcpy(newstr, str);
return newstr;
}