Date: Fri, 7 Mar 2003 13:57:55 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26511 for review Message-ID: <200303072157.h27LvtZH089713@repoman.freebsd.org>
index | next in thread | raw e-mail
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 messagehelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303072157.h27LvtZH089713>
