mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:12:57 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
34
lib/3rdparty/libwine/debug_ros.c
vendored
Normal file
34
lib/3rdparty/libwine/debug_ros.c
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue