s3: Factor out "mark_file_modified"
[Samba/gebeck_regimport.git] / lib / ccan / failtest / failtest_proto.h
blob3c2df1d31d21b12ea8fa99329aa08a5dada44bc0
1 /* Licensed under LGPL - see LICENSE file for details */
2 #ifndef CCAN_FAILTEST_PROTO_H
3 #define CCAN_FAILTEST_PROTO_H
4 #include <stdlib.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 void *failtest_mmap(void *addr, size_t length, int prot, int flags,
25 int fd, off_t offset, const char *file, unsigned line);
26 void *failtest_mmap_noloc(void *addr, size_t length, int prot, int flags,
27 int fd, off_t offset);
28 off_t failtest_lseek(int fd, off_t offset, int whence,
29 const char *file, unsigned line);
30 int failtest_close(int fd, const char *file, unsigned line);
31 int failtest_fcntl(int fd, const char *file, unsigned line, int cmd, ...);
32 pid_t failtest_getpid(const char *file, unsigned line);
33 #endif /* CCAN_FAILTEST_PROTO_H */