Date: Tue, 19 Dec 2006 17:07:52 -0500 From: Christopher Hilton <chris@vindaloo.com> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-stable@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Is syslog() reentrant? Was: OpenBSD's spamd. Message-ID: <458862B8.5060709@vindaloo.com> In-Reply-To: <20061219201110.GB87992@dan.emsphone.com> References: <45844912.7070103@vindaloo.com> <45884075.50108@vindaloo.com> <20061219201110.GB87992@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson wrote: > In the last episode (Dec 19), Christopher Hilton said: >> A casual attempt to compile a fresher copy of the software shows that >> spamd is using the OpenBSD's reentrant syslog functions (syslog_r, >> openlog_r, etc) Is FreeBSD's syslog already reentrant? > > It is, as of FreeBSD 5.4. In previous versions only openlog() and > syslog("%m") with an invalid errno were non-reentrant. > Awesome. Then all I have to do to get the fresher code is either wrap the openlog_r and syslog_r calls in the spamd.c or write local functions which do the same. From the point of style which is preferable? Is it even possible to #define a C function to get around an argument? E.g. The openbsd syslog_r function has this call sequence: void syslog_r(int priority, struct syslog_data *data, const char *message, ...); IIRC there isn't a way to get around the '...' argument with #define and deal with the extra argument. -- Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?458862B8.5060709>