chiark / gitweb /
@@ -11,6 +11,11 @@
[adns] / regress / harness.h.m4
CommitLineData
078c4fd0 1m4_dnl harness.h.m4
2m4_dnl (part of complex test harness, not of the library)
3m4_dnl - function and other declarations
4
a79ac5ba 5m4_dnl This file is
09aee00b 6m4_dnl Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
a79ac5ba 7m4_dnl
8m4_dnl It is part of adns, which is
89435c42 9m4_dnl Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
c6826df6 10m4_dnl Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
078c4fd0 11m4_dnl
12m4_dnl This program is free software; you can redistribute it and/or modify
13m4_dnl it under the terms of the GNU General Public License as published by
14m4_dnl the Free Software Foundation; either version 2, or (at your option)
15m4_dnl any later version.
16m4_dnl
17m4_dnl This program is distributed in the hope that it will be useful,
18m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
19m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20m4_dnl GNU General Public License for more details.
21m4_dnl
22m4_dnl You should have received a copy of the GNU General Public License
23m4_dnl along with this program; if not, write to the Free Software Foundation,
24m4_dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26m4_include(hmacros.i4)
27
28#ifndef HARNESS_H_INCLUDED
29#define HARNESS_H_INCLUDED
30
078c4fd0 31#include "internal.h"
09aee00b 32#include "hsyscalls.h"
fc86e61f 33
078c4fd0 34/* There is a Q function (Q for Question) for each such syscall;
35 * it constructs a string representing the call, and calls Q_str
36 * on it, or constructs it in vb and calls Q_vb;
37 */
38
39hm_create_proto_q
40m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));')
09aee00b 41m4_define(`hm_specsyscall', `')
078c4fd0 42m4_include(`hsyscalls.i4')
43
44void Q_vb(void);
45
fc86e61f 46extern void Tshutdown(void);
47
078c4fd0 48/* General help functions */
49
50void Tfailed(const char *why);
51void Toutputerr(void);
52void Tnomem(void);
53void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2);
0366bd10 54void Tensurerecordfile(void);
078c4fd0 55void Tmust(const char *call, const char *arg, int cond);
56
57void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2);
58void Tvbvf(const char *fmt, va_list al);
59void Tvbfdset(int max, const fd_set *set);
2d5cce62 60void Tvbpollfds(const struct pollfd *fds, int nfds);
078c4fd0 61void Tvbaddr(const struct sockaddr *addr, int addrlen);
62void Tvbbytes(const void *buf, int len);
63void Tvberrno(int e);
64void Tvba(const char *str);
65
66/* Shared globals */
67
68extern vbuf vb;
3c5796f7 69extern struct timeval currenttime;
078c4fd0 70extern const struct Terrno { const char *n; int v; } Terrnos[];
71
72#endif