chiark / gitweb /
Fix typo in changelog entry for 1.6.1
[adns.git] / regress / harness.h.m4
1 m4_dnl harness.h.m4
2 m4_dnl (part of complex test harness, not of the library)
3 m4_dnl - function and other declarations
4
5 m4_dnl  This file is part of adns, which is Copyright Ian Jackson
6 m4_dnl  and contributors (see the file INSTALL for full details).
7 m4_dnl  
8 m4_dnl  This program is free software; you can redistribute it and/or modify
9 m4_dnl  it under the terms of the GNU General Public License as published by
10 m4_dnl  the Free Software Foundation; either version 3, or (at your option)
11 m4_dnl  any later version.
12 m4_dnl  
13 m4_dnl  This program is distributed in the hope that it will be useful,
14 m4_dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 m4_dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 m4_dnl  GNU General Public License for more details.
17 m4_dnl  
18 m4_dnl  You should have received a copy of the GNU General Public License
19 m4_dnl  along with this program; if not, write to the Free Software Foundation.
20
21 m4_include(hmacros.i4)
22
23 #ifndef HARNESS_H_INCLUDED
24 #define HARNESS_H_INCLUDED
25
26 #include "internal.h"
27 #include "hsyscalls.h"
28
29 /* There is a Q function (Q for Question) for each such syscall;
30  * it constructs a string representing the call, and calls Q_str
31  * on it, or constructs it in vb and calls Q_vb;
32  */
33
34 hm_create_proto_q
35 m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));')
36 m4_define(`hm_specsyscall', `')
37 m4_include(`hsyscalls.i4')
38 hm_stdsyscall_close
39
40 void Q_vb(void);
41
42 extern void Tshutdown(void);
43
44 /* General help functions */
45
46 void Tfailed(const char *why);
47 void Toutputerr(void);
48 void Tnomem(void);
49 void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2);
50 void Tensuresetup(void);
51 void Tmust(const char *call, const char *arg, int cond);
52
53 void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2);
54 void Tvbvf(const char *fmt, va_list al);
55 void Tvbfdset(int max, const fd_set *set);
56 void Tvbpollfds(const struct pollfd *fds, int nfds);
57 void Tvbaddr(const struct sockaddr *addr, int addrlen);
58 void Tvbbytes(const void *buf, int len);
59 void Tvberrno(int e);
60 void Tvba(const char *str);
61
62 /* Shared globals */
63
64 extern vbuf vb;
65 extern struct timeval currenttime;
66 extern const struct Terrno { const char *n; int v; } Terrnos[];
67 extern const int Tnerrnos;
68
69 /* Special cases */
70   
71 void Texit(int rv) NONRETURNING;
72
73 void Tcommonshutdown(void);
74 void Tmallocshutdown(void);
75 int Ttestinputfd(void);
76 void T_gettimeofday_hook(void);
77
78 #endif