]> git.ozlabs.org Git - ccan/blob - ccan/failtest/failtest_undo.h
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / failtest / failtest_undo.h
1 /* Licensed under LGPL - see LICENSE file for details */
2 #ifndef CCAN_FAILTEST_RESTORE_H
3 #define CCAN_FAILTEST_RESTORE_H
4 /* This file undoes the effect of failtest_override.h. */
5
6 #undef calloc
7 #define calloc(nmemb, size)     \
8         failtest_calloc((nmemb), (size), NULL, 0)
9
10 #undef malloc
11 #define malloc(size)    \
12         failtest_malloc((size), NULL, 0)
13
14 #undef realloc
15 #define realloc(ptr, size)                                      \
16         failtest_realloc((ptr), (size), NULL, 0)
17
18 #undef open
19 #define open(pathname, ...) \
20         failtest_open((pathname), NULL, 0, __VA_ARGS__)
21
22 #undef pipe
23 #define pipe(pipefd) \
24         failtest_pipe((pipefd), NULL, 0)
25
26 #undef read
27 #define read(fd, buf, count) \
28         failtest_read((fd), (buf), (count), NULL, 0)
29
30 #undef write
31 #define write(fd, buf, count) \
32         failtest_write((fd), (buf), (count), NULL, 0)
33
34 #undef mmap
35 #define mmap(addr, length, prot, flags, fd, offset) \
36         failtest_mmap((addr), (length), (prot), (flags), (fd), (offset), NULL, 0)
37
38 #undef lseek
39 #define lseek(fd, off, whence) \
40         failtest_lseek((fd), (off), (whence), NULL, 0)
41
42 #undef close
43 #define close(fd) failtest_close(fd)
44
45 #undef fcntl
46 #define fcntl(fd, ...) \
47         failtest_fcntl((fd), NULL, 0, __VA_ARGS__)
48
49 #endif /* CCAN_FAILTEST_RESTORE_H */