From owner-freebsd-stable@FreeBSD.ORG Tue Dec 19 23:18:36 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2235F16A407; Tue, 19 Dec 2006 23:18:36 +0000 (UTC) (envelope-from clint@0lsen.net) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [63.240.77.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id A22AD43CA0; Tue, 19 Dec 2006 23:18:33 +0000 (GMT) (envelope-from clint@0lsen.net) Received: from 0lsen.net ([24.20.127.157]) by comcast.net (sccrmhc11) with ESMTP id <2006121923032701100pn1ipe>; Tue, 19 Dec 2006 23:03:27 +0000 Received: by 0lsen.net (Postfix, from userid 1001) id 7F60017C94; Tue, 19 Dec 2006 15:03:26 -0800 (PST) Date: Tue, 19 Dec 2006 15:03:26 -0800 From: Clint Olsen To: Christopher Hilton Message-ID: <20061219230326.GG48347@0lsen.net> References: <45844912.7070103@vindaloo.com> <45884075.50108@vindaloo.com> <20061219201110.GB87992@dan.emsphone.com> <458862B8.5060709@vindaloo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <458862B8.5060709@vindaloo.com> User-Agent: Mutt/1.4.2.2i Organization: NULlsen Network X-Disclaimer: Mutt Bites! Cc: freebsd-stable@freebsd.org, Dan Nelson , freebsd-ports@freebsd.org Subject: Re: Is syslog() reentrant? Was: OpenBSD's spamd. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2006 23:18:36 -0000 On Dec 19, Christopher Hilton wrote: > 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. Only C99 allows macros with variable arguments. But you can attempt to just replace the function identifier (name) if the function's arguments are otherwise in the same order. -Clint -- Clint Olsen . -- . clint at NULlsen dot net .' ,-. `. ;_,' ( ; "I am Dick Lexic of Borg. Prepare to be ass-laminated." `. ``;' -- Styx Allum ` -- '