mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
add winfsp-tests and ext/tlib
This commit is contained in:
29
ext/tlib/injected/stdfunc.c
Normal file
29
ext/tlib/injected/stdfunc.c
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @file tlib/injected/stdfunc.c
|
||||
*
|
||||
* @copyright 2014-2015 Bill Zissimopoulos
|
||||
*/
|
||||
|
||||
#include <tlib/injected/stdfunc.h>
|
||||
#define TLIB_INJECTIONS_ENABLED
|
||||
#include <tlib/injection.h>
|
||||
|
||||
#undef calloc
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
|
||||
void *tlib_calloc(size_t count, size_t size)
|
||||
{
|
||||
TLIB_INJECT("calloc", return 0);
|
||||
return calloc(count, size);
|
||||
}
|
||||
void *tlib_malloc(size_t size)
|
||||
{
|
||||
TLIB_INJECT("malloc", return 0);
|
||||
return malloc(size);
|
||||
}
|
||||
void *tlib_realloc(void *ptr, size_t size)
|
||||
{
|
||||
TLIB_INJECT("realloc", return 0);
|
||||
return realloc(ptr, size);
|
||||
}
|
Reference in New Issue
Block a user