ReactOS 0.4.16-dev-257-g6aa11ac
debug_ros.c
Go to the documentation of this file.
1/* The use of these four functions was creating unwanted imports
2 * from msvcrt.dll in kernel32.dll. */
3
4#define malloc libwine_malloc
5#define free libwine_free
6#define realloc libwine_realloc
7#define _strdup libwine__strdup
8
9#include "debug.c"
10
12void * __cdecl malloc(size_t size)
13{
14 return LocalAlloc(0, size);
15}
16
17void __cdecl free(void *ptr)
18{
20}
21
22void * __cdecl realloc(void *ptr, size_t size)
23{
24 if (ptr == NULL) return malloc(size);
26}
27
29char * __cdecl _strdup(const char *str)
30{
31 char *newstr = malloc(strlen(str) + 1);
32 if (newstr) strcpy(newstr, str);
33 return newstr;
34}
#define __MINGW_ATTRIB_MALLOC
Definition: _mingw.h:108
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define __cdecl
Definition: accygwin.h:79
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define _strdup
Definition: debug_ros.c:7
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
GLsizeiptr size
Definition: glext.h:5919
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
Definition: heapmem.c:1625
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
#define LMEM_MOVEABLE
Definition: winbase.h:395