Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Convert EV_SET(2) back into macro again
details: https://anonhg.NetBSD.org/src/rev/eae7c6f44ad6
branches: trunk
changeset: 354059:eae7c6f44ad6
user: kamil <kamil%NetBSD.org@localhost>
date: Fri Jun 02 19:44:06 2017 +0000
description:
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>
diffstat:
sys/sys/event.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r e3c2f8d9d18d -r eae7c6f44ad6 sys/sys/event.h
--- a/sys/sys/event.h Fri Jun 02 19:35:54 2017 +0000
+++ b/sys/sys/event.h Fri Jun 02 19:44:06 2017 +0000
@@ -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 <jlemon%FreeBSD.org@localhost>
@@ -54,8 +54,11 @@
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;
Home |
Main Index |
Thread Index |
Old Index