From quinot@inf.enst.fr  Mon Mar 11 04:32:18 2002
Return-Path: <quinot@inf.enst.fr>
Received: from infres.enst.fr (infres-192.enst.fr [137.194.192.1])
	by hub.freebsd.org (Postfix) with ESMTP id F3DED37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Mar 2002 04:32:17 -0800 (PST)
Received: from shalmaneser.enst.fr (shalmaneser.enst.fr [137.194.162.11])
	by infres.enst.fr (Postfix) with ESMTP id 79D8818D9
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Mar 2002 13:32:09 +0100 (MET)
Received: by shalmaneser.enst.fr (Postfix, from userid 11117)
	id AD13B1151C; Mon, 11 Mar 2002 12:25:02 +0100 (CET)
Message-Id: <20020311112502.AD13B1151C@shalmaneser.enst.fr>
Date: Mon, 11 Mar 2002 12:25:02 +0100 (CET)
From: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] nfsd does not compile with -DDEBUG
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35773
>Category:       bin
>Synopsis:       [patch] nfsd does not compile with -DDEBUG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 11 04:40:01 PST 2002
>Closed-Date:    Tue Mar 26 09:38:34 PST 2002
>Last-Modified:  Tue Mar 26 09:38:34 PST 2002
>Originator:     Thomas Quinot
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD shalmaneser.enst.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Thu Feb 28 18:08:36 CET 2002 quinot@shalmaneser.enst.fr:/usr/obj/usr/src/sys/SHALMANESER i386


	
>Description:
	When compiled with -DDEBUG, nfsd #defines syslog to a macro with
	a fixed number of arguments, whereas it should use a variadic
	macro.
>How-To-Repeat:
# cd /usr/src/sbin/nfsd
# make CFLAGS=-DDEBUG
cc -DDEBUG -c /usr/src/sbin/nfsd/nfsd.c
/usr/src/sbin/nfsd/nfsd.c:383: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:406: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:452: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:476: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:518: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:542: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:593: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:617: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:750: macro `syslog' used with too many (4) args

>Fix:

--- sbin/nfsd/nfsd.c.dist	Mon Mar 11 11:31:35 2002
+++ sbin/nfsd/nfsd.c	Mon Mar 11 11:31:03 2002
@@ -75,7 +75,7 @@
 
 /* Global defs */
 #ifdef DEBUG
-#define	syslog(e, s)	fprintf(stderr,(s))
+#define	syslog(e, s...)	fprintf(stderr,s)
 int	debug = 1;
 #else
 int	debug = 0;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pb 
State-Changed-When: Tue Mar 26 09:38:17 PST 2002 
State-Changed-Why:  
Committed to -current. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35773 
>Unformatted:
