X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest_override.h;h=d5be2829d5e0dd418ae35eb4dd7b2f26543cccf7;hb=32aaf753429b178eb1a6e79576c005ac915b4447;hp=3bd0f8fc2443d43a9459ac96529b6792687c0623;hpb=f070b47bc6458e7a374e48c15336f329529e5fdd;p=ccan diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index 3bd0f8fc..d5be2829 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -17,6 +17,10 @@ #define realloc(ptr, size) \ failtest_realloc((ptr), (size), __FILE__, __LINE__) +#undef free +#define free(ptr) \ + failtest_free(ptr) + /* Replacement of I/O. */ #include #include @@ -39,6 +43,14 @@ #define write(fd, buf, count) \ failtest_write((fd), (buf), (count), __FILE__, __LINE__) +#undef pread +#define pread(fd, buf, count, off) \ + failtest_pread((fd), (buf), (count), (off), __FILE__, __LINE__) + +#undef pwrite +#define pwrite(fd, buf, count, off) \ + failtest_pwrite((fd), (buf), (count), (off), __FILE__, __LINE__) + #undef close #define close(fd) failtest_close(fd)