Kai Großjohann 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 setup
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
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to