fuzzraw wants to track fds, so we can't just pass to through there.
All the other sites get a macro hm_stdsyscall_close to just get
the simple version.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));')
m4_define(`hm_specsyscall', `')
m4_include(`hsyscalls.i4')
m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));')
m4_define(`hm_specsyscall', `')
m4_include(`hsyscalls.i4')
m4_include(`hsyscalls.i4')
m4_include(`hsyscalls.i4')
void Tvbaddr(const struct sockaddr *addr, int len) {
char buf[ADNS_ADDR2TEXT_BUFLEN];
int err, port;
void Tvbaddr(const struct sockaddr *addr, int len) {
char buf[ADNS_ADDR2TEXT_BUFLEN];
int err, port;
m4_include(`hsyscalls.i4')
m4_include(`hsyscalls.i4')
+int Hclose(int fd) {
+ int r;
+ P_fdf(fd);
+ fdtab.buf[fd]= 0;
+ hm_rv_succfail
+ return r;
+}
m4_define(`hm_specsyscall', `')
m4_include(`hsyscalls.i4')
m4_define(`hm_specsyscall', `')
m4_include(`hsyscalls.i4')
m4_define(`hm_specsyscall', `')
m4_include(`hsyscalls.i4')
m4_define(`hm_specsyscall', `')
m4_include(`hsyscalls.i4')
hm_arg_int(backlog) hm_na
')
hm_arg_int(backlog) hm_na
')
-hm_syscall(
- close, `hm_rv_succfail', `
- hm_arg_fd(fd) hm_na
-')
-
hm_syscall(
sendto, `hm_rv_any', `
hm_arg_fd(fd) hm_na
hm_syscall(
sendto, `hm_rv_any', `
hm_arg_fd(fd) hm_na
hm_specsyscall(int, writev, `int fd, const struct iovec *vector, size_t count')
hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz')
hm_specsyscall(pid_t, getpid, `void')
hm_specsyscall(int, writev, `int fd, const struct iovec *vector, size_t count')
hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz')
hm_specsyscall(pid_t, getpid, `void')
+hm_specsyscall(int, close, `int fd')
+
+m4_define(hm_stdsyscall_close,`
+hm_syscall(
+ close, `hm_rv_succfail', `
+ hm_arg_fd(fd) hm_na
+')
+')
hm_specsyscall(void*, malloc, `size_t sz')
hm_specsyscall(void, free, `void *ptr')
hm_specsyscall(void*, malloc, `size_t sz')
hm_specsyscall(void, free, `void *ptr')