Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendebug_ros.c
Go to the documentation of this file.
00001 /* The use of these four functions was creating unwanted imports 00002 * from msvcrt.dll in kernel32.dll. */ 00003 00004 #define malloc libwine_malloc 00005 #define free libwine_free 00006 #define realloc libwine_realloc 00007 #define _strdup libwine__strdup 00008 #define interlocked_xchg_add InterlockedExchangeAdd 00009 00010 #include "debug.c" 00011 00012 __MINGW_ATTRIB_MALLOC 00013 void *malloc(size_t size) 00014 { 00015 return LocalAlloc(0, size); 00016 } 00017 00018 void free(void *ptr) 00019 { 00020 LocalFree(ptr); 00021 } 00022 00023 void *realloc(void *ptr, size_t size) 00024 { 00025 if (ptr == NULL) return malloc(size); 00026 return LocalReAlloc(ptr, size, LMEM_MOVEABLE); 00027 } 00028 00029 __MINGW_ATTRIB_MALLOC 00030 char *_strdup(const char *str) 00031 { 00032 char *newstr = malloc(strlen(str) + 1); 00033 if (newstr) strcpy(newstr, str); 00034 return newstr; 00035 } Generated on Sat May 26 2012 04:33:05 for ReactOS by
1.7.6.1
|