From owner-p4-projects Fri Mar 7 13:57:59 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E1C437B406; Fri, 7 Mar 2003 13:57:57 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 979D537B405 for ; Fri, 7 Mar 2003 13:57:56 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2040843FBD for ; Fri, 7 Mar 2003 13:57:56 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h27Lvt0U089716 for ; Fri, 7 Mar 2003 13:57:55 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h27LvtZH089713 for perforce@freebsd.org; Fri, 7 Mar 2003 13:57:55 -0800 (PST) Date: Fri, 7 Mar 2003 13:57:55 -0800 (PST) Message-Id: <200303072157.h27LvtZH089713@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 26511 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=26511 Change 26511 by jhb@jhb_laptop on 2003/03/07 13:56:54 Yuck. Use a GCCism to work around a limitation in C99's varadiac macro args. C99 doesn't handle the case of __VA_ARGS__ being empty. :-/ Affected files ... .. //depot/projects/smpng/sys/sys/eventhandler.h#15 edit Differences ... ==== //depot/projects/smpng/sys/sys/eventhandler.h#15 (text+ko) ==== @@ -77,7 +77,7 @@ _t = (struct eventhandler_entry_ ## name *)_ep; \ CTR1(KTR_EVH, "eventhandler_invoke: executing %p", \ (void *)_t->eh_func); \ - _t->eh_func(_ep->ee_arg , __VA_ARGS__); \ + _t->eh_func(_ep->ee_arg , ## __VA_ARGS__); \ EHL_LOCK((list)); \ } \ } \ @@ -117,7 +117,7 @@ \ if (_el->el_flags & EHL_INITTED) { \ EHL_LOCK(_el); \ - _EVENTHANDLER_INVOKE(name, _el, __VA_ARGS__); \ + _EVENTHANDLER_INVOKE(name, _el , ## __VA_ARGS__); \ } \ } while (0) @@ -154,7 +154,7 @@ struct eventhandler_list *_el; \ \ if ((_el = eventhandler_find_list(#name)) != NULL) \ - _EVENTHANDLER_INVOKE(name, _el, __VA_ARGS__); \ + _EVENTHANDLER_INVOKE(name, _el , ## __VA_ARGS__); \ } while (0) #define EVENTHANDLER_REGISTER(name, func, arg, priority) \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message