From owner-freebsd-current Mon Feb 28 6:19:11 2000 Delivered-To: freebsd-current@freebsd.org Received: from chmls06.mediaone.net (chmls06.mediaone.net [24.128.1.71]) by hub.freebsd.org (Postfix) with ESMTP id D484437B5B4; Mon, 28 Feb 2000 06:19:06 -0800 (PST) (envelope-from bloom@acm.org) Received: from acm.org (reyim.ne.mediaone.net [24.218.251.241]) by chmls06.mediaone.net (8.8.7/8.8.7) with ESMTP id JAA23899; Mon, 28 Feb 2000 09:18:59 -0500 (EST) Message-ID: <38BA83C4.8457CC69@acm.org> Date: Mon, 28 Feb 2000 09:18:44 -0500 From: Jim Bloom X-Mailer: Mozilla 4.7 [en]C-MOENE (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Kai =?iso-8859-1?Q?Gro=DFjohann?= Cc: freebsd-current@FreeBSD.ORG, freebsd-ipfw@FreeBSD.ORG Subject: Re: cpp change breaks ipfw References: <38B8BAC5.9927A56E@acm.org> <38BA6E6D.239DEDB1@acm.org> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kai Gro=DFjohann wrote: > = > /---- > | $ cat foo > | #define rule(ADDR,MASK) add pass tcp from ADDR ## : ## MASK to any 25= setup > | rule(192.168.2.5,255.255.254.0) > | $ type cpp > | cpp is hashed (/usr/bin/cpp) > | $ cpp foo > | # 1 "foo" > | > | add pass tcp from 192.168.2.5:255.255.254.0 to any 25 setup > | $ cpp --version > | 2.95.2 > \---- > = > Note that there is no space in ``192.168.2.5:255.255.254.0''. I > thought that this is what you wanted? If this isn't what you wanted, > I'm sorry for the misunderstanding. That small test works fine, but doesn't solve the problem I was having. = Try this small test case to see my problem: #define addr 192.186.2.5 #define mask 255.255.240.0 #define rule(ADDR,MASK) add pass tcp from ADDR ## : ## MASK to any 25 set= up rule(addr,mask) This also does not work if addr and mask are defined on the command line.= The problem arises from using another defined value as the string being concatenated. The concatenation works for constants though. Jim Bloom bloom@acm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message