Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / isc / error.h
blob191e426b814e92f30da9641a5611511b7d1e2a14
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 1998-2001 Internet Software Consortium.
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
11 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
12 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
13 * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
15 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
16 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
17 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 /* Id: error.h,v 1.13 2001/01/09 21:56:51 bwelling Exp */
22 #ifndef ISC_ERROR_H
23 #define ISC_ERROR_H 1
25 #include <stdarg.h>
27 #include <isc/formatcheck.h>
28 #include <isc/lang.h>
30 ISC_LANG_BEGINDECLS
32 typedef void (*isc_errorcallback_t)(const char *, int, const char *, va_list);
34 void
35 isc_error_setunexpected(isc_errorcallback_t);
37 void
38 isc_error_setfatal(isc_errorcallback_t);
40 void
41 isc_error_unexpected(const char *, int, const char *, ...)
42 ISC_FORMAT_PRINTF(3, 4);
44 void
45 isc_error_fatal(const char *, int, const char *, ...)
46 ISC_FORMAT_PRINTF(3, 4);
48 void
49 isc_error_runtimecheck(const char *, int, const char *);
51 #define ISC_ERROR_RUNTIMECHECK(cond) \
52 ((void) ((cond) || \
53 ((isc_error_runtimecheck)(__FILE__, __LINE__, #cond), 0)))
55 ISC_LANG_ENDDECLS
57 #endif /* ISC_ERROR_H */