1 /* Licensed under LGPL - see LICENSE file for details */
2 #ifndef CCAN_FAILTEST_PROTO_H
3 #define CCAN_FAILTEST_PROTO_H
6 /* Potentially-failing versions of routines; #defined in failtest.h */
7 void *failtest_calloc(size_t nmemb, size_t size,
8 const char *file, unsigned line);
9 void *failtest_malloc(size_t size, const char *file, unsigned line);
10 void *failtest_realloc(void *ptr, size_t size,
11 const char *file, unsigned line);
12 void failtest_free(void *ptr);
13 int failtest_open(const char *pathname,
14 const char *file, unsigned line, ...);
15 int failtest_pipe(int pipefd[2], const char *file, unsigned line);
16 ssize_t failtest_read(int fd, void *buf, size_t count,
17 const char *file, unsigned line);
18 ssize_t failtest_write(int fd, const void *buf, size_t count,
19 const char *file, unsigned line);
20 ssize_t failtest_pread(int fd, void *buf, size_t count, off_t offset,
21 const char *file, unsigned line);
22 ssize_t failtest_pwrite(int fd, const void *buf, size_t count, off_t offset,
23 const char *file, unsigned line);
24 int failtest_close(int fd, const char *file, unsigned line);
25 int failtest_fcntl(int fd, const char *file, unsigned line, int cmd, ...);
26 pid_t failtest_getpid(const char *file, unsigned line);
27 #endif /* CCAN_FAILTEST_PROTO_H */