From hno@marasystems.com Mon May 10 00:04:42 2004 Return-Path: Received: from willy.net1.nerim.net (vax [10.2.1.2]) by alpha.home.local (8.12.4/8.12.1) with ESMTP id i49M4fdB021419 for ; Mon, 10 May 2004 00:04:41 +0200 Received: from filer.marasystems.com (marasystems.com [213.150.153.194]) by willy.net1.nerim.net (8.12.9/8.12.1) with ESMTP id i49M4rCb004495 for ; Mon, 10 May 2004 00:04:54 +0200 (CEST) Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i49M4ok15008; Mon, 10 May 2004 00:04:50 +0200 Date: Mon, 10 May 2004 00:04:50 +0200 (CEST) From: Henrik Nordstrom X-X-Sender: henrik@filer.marasystems.com To: Willy TARREAU cc: Jozsef Kadlecsik , Subject: Re: patch-o-matic-ng release candidate in cvs In-Reply-To: <20040509164411.GA20463@pcw.home.local> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: RO Content-Length: 2225 Lines: 54 On Sun, 9 May 2004, Willy TARREAU wrote: > While INFOP needs at least 2 arguments : > > #define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__, ## args) Actually I think the bug is that there is no space infront of the comma in the ## expansion. To limit the conflicts with C99 the GNU CPP varargs comma magics is only activated if there is a space infront of the comma like in this example from the GNU CPP manual: #define eprintf(format, args...) fprintf (stderr, format , ##args) > I had to fix it with the following patch. It should not change the > binary size much since there are very few callers of this macro. The binary should be unaffected as this is preprocessor juggling only.. the resulting C code is identical in both cases. Revised patch (done inline by modifying your patch, not tested): --- ./net/ipv4/netfilter/ip_nat_rtsp.c.orig Sun May 9 17:14:49 2004 +++ ./net/ipv4/netfilter/ip_nat_rtsp.c Sun May 9 17:15:35 2004 @@ -50,9 +50,9 @@ #define NF_NEED_MIME_NEXTLINE #include -#define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__, ## args) +#define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args) #ifdef IP_NF_RTSP_DEBUG -#define DEBUGP(fmt, args...) printk(KERN_DEBUG "%s: %s: " fmt, __FILE__, __FUNCTION__, ## args) +#define DEBUGP(fmt, args...) printk(KERN_DEBUG "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args) #else #define DEBUGP(fmt, args...) #endif --- ./net/ipv4/netfilter/ip_conntrack_rtsp.c.orig Sun May 9 17:04:01 2004 +++ ./net/ipv4/netfilter/ip_conntrack_rtsp.c Sun May 9 17:14:32 2004 @@ -42,9 +42,9 @@ #define MAX_SIMUL_SETUP 8 /* XXX: use max_outstanding */ -#define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__, ## args) +#define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args) #ifdef IP_NF_RTSP_DEBUG -#define DEBUGP(fmt, args...) printk(KERN_DEBUG "%s: %s: " fmt, __FILE__, __FUNCTION__, ## args) +#define DEBUGP(fmt, args...) printk(KERN_DEBUG "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args) #else #define DEBUGP(fmt, args...) #endif Regards Henrik