diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-04-21 20:02:41 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-04-21 20:02:41 +0000 |
commit | 483c556c961377c65bc37a43cba770bfb7f24db2 (patch) | |
tree | f12eebcedd009fa08292bf672d9230e65b401f59 /lib/libevent/log.h | |
parent | 478d2f807269d4a1dc2066ed302f9716adb8b3f9 (diff) |
Update libevent to 1.4.13.
This is the core library only, the DNS parts are removed and it does not
include the other extra bits (HTTP, DNS, and RPC), a separate port for
these will appear in due course.
Thanks to jsg, sthen, alek, gilles, jacekm, bernd and any others I've
forgotten for testing/comments.
Note that /usr/include/evdns.h should be removed after updating.
ok deraadt
Diffstat (limited to 'lib/libevent/log.h')
-rw-r--r-- | lib/libevent/log.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/libevent/log.h b/lib/libevent/log.h index d39e0c2b541..2f350940947 100644 --- a/lib/libevent/log.h +++ b/lib/libevent/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.5 2008/05/02 06:09:11 brad Exp $ */ +/* $OpenBSD: log.h,v 1.6 2010/04/21 20:02:40 nicm Exp $ */ /* * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> @@ -29,12 +29,18 @@ #ifndef _LOG_H_ #define _LOG_H_ -void event_err(int eval, const char *fmt, ...); -void event_warn(const char *fmt, ...); -void event_errx(int eval, const char *fmt, ...); -void event_warnx(const char *fmt, ...); -void event_msgx(const char *fmt, ...); -void _event_debugx(const char *fmt, ...); +#ifdef __GNUC__ +#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b))) +#else +#define EV_CHECK_FMT(a,b) +#endif + +void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3); +void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2); +void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3); +void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2); +void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2); +void _event_debugx(const char *fmt, ...) EV_CHECK_FMT(1,2); #ifdef USE_DEBUG #define event_debug(x) _event_debugx x @@ -42,4 +48,6 @@ void _event_debugx(const char *fmt, ...); #define event_debug(x) do {;} while (0) #endif +#undef EV_CHECK_FMT + #endif |