1 /* The use of these four functions was creating unwanted imports
2 * from msvcrt.dll in kernel32.dll. */
4 #define malloc libwine_malloc
5 #define free libwine_free
6 #define realloc libwine_realloc
7 #define _strdup libwine__strdup
12 void *malloc(size_t size
)
14 return LocalAlloc(0, size
);
22 void *realloc(void *ptr
, size_t size
)
24 if (ptr
== NULL
) return malloc(size
);
25 return LocalReAlloc(ptr
, size
, LMEM_MOVEABLE
);
29 char *_strdup(const char *str
)
31 char *newstr
= malloc(strlen(str
) + 1);
32 if (newstr
) strcpy(newstr
, str
);