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
8 #define interlocked_xchg_add InterlockedExchangeAdd
13 void *malloc(size_t size
)
15 return LocalAlloc(0, size
);
23 void *realloc(void *ptr
, size_t size
)
25 if (ptr
== NULL
) return malloc(size
);
26 return LocalReAlloc(ptr
, size
, LMEM_MOVEABLE
);
30 char *_strdup(const char *str
)
32 char *newstr
= malloc(strlen(str
) + 1);
33 if (newstr
) strcpy(newstr
, str
);