Module Name: src Committed By: kamil Date: Fri Jun 2 19:44:06 UTC 2017
Modified Files: src/sys/sys: event.h Log Message: Convert EV_SET(2) back into macro again This retains compatibility with other moder BSDs if someone uses: "#ifdef EV_SET". This code also casts the last parameter to intptr_t, as other BSDs keep this argument with a different type void*. This change renames function EV_SET to EV_SET_, and calls it from EV_SET(). Credit to <christos> and <kre> for feedback. Sponsored by <The NetBSD Foundation> To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/sys/event.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/event.h diff -u src/sys/sys/event.h:1.27 src/sys/sys/event.h:1.28 --- src/sys/sys/event.h:1.27 Wed May 31 00:45:59 2017 +++ src/sys/sys/event.h Fri Jun 2 19:44:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: event.h,v 1.27 2017/05/31 00:45:59 kamil Exp $ */ +/* $NetBSD: event.h,v 1.28 2017/06/02 19:44:06 kamil Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jle...@freebsd.org> @@ -54,8 +54,11 @@ struct kevent { intptr_t udata; /* opaque user data identifier */ }; +#define EV_SET(kevp, a, b, c, d, e, f) \ + EV_SET_((kevp), (a), (b), (c), (d), (e), __CAST(intptr_t, (f))) + static __inline void -EV_SET(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter, +EV_SET_(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter, uint32_t _flags, uint32_t _fflags, int64_t _data, intptr_t _udata) { _kevp->ident = _ident;