From owner-freebsd-hackers Wed Jul 18 11: 8:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id 43A5437B406 for ; Wed, 18 Jul 2001 11:08:32 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id C6D595D010; Wed, 18 Jul 2001 13:08:21 -0500 (CDT) Date: Wed, 18 Jul 2001 13:08:21 -0500 From: Alfred Perlstein To: Sheldon Hearn Cc: freebsd-hackers@FreeBSD.org Subject: Re: Weird problem in 4.3-STABLE Message-ID: <20010718130821.J28164@sneakerz.org> References: <11254.995477648@axl.seasidesoftware.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <11254.995477648@axl.seasidesoftware.co.za>; from sheldonh@starjuice.net on Wed, Jul 18, 2001 at 07:34:08PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Sheldon Hearn [010718 12:33] wrote: > > Hi folks, > > I'm busy developing a libdaemon implementation and have come unstuck on > a weird problem with functions using variable argument lists in FreeBSD > 4.3-STABLE. > > What I really want is a static inline void function declared in a header > file and included in various source files, looking something like this: > > static inline void > xdaemonwarn(char *fmt, ...) > { > va_list ap; > > va_start(ap, fmt); > if (!daemon_quiet) > warn(fmt, ap); > va_end(ap); > > return; > } > > GCC gives "syntax error before 'void'". Fair enough. > > So obviously, this should be implemented as a macro. But GCC warns that > ANSI C doesn't support variable arguments to macros. Fine. I think you have a problem with inline actually. :) -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message