#define realloc(ptr, size) \
failtest_realloc((ptr), (size), __FILE__, __LINE__)
+#undef free
+#define free(ptr) \
+ failtest_free(ptr)
+
/* Replacement of I/O. */
#include <sys/types.h>
#include <sys/stat.h>
#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)
+#define close(fd) failtest_close(fd, __FILE__, __LINE__)
#undef fcntl
#define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__)