[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    RE: a chicken-egg problem with bootp and nfs_mountroot
From:       sbabkin () dcn ! att ! com
Date:       1998-02-27 16:18:16
[Download RAW message or body]

> ----------
> From: 	John-Mark Gurney[SMTP:gurney_j@efn.org]
> 
> Doug Ambrisko scribbled this message on Feb 26:
> > 
> > Don't think so for example:
> > 	options	"BOOTP_WIRED_TO=fxp0"
> > Then in a c-snippet:
> > 	strcmp(string,BOOTP_WIRED_TO)
> > Will change into
> > 	strcmp(string,fxp0)
> > which will fail to compile want
> > 	 strcmp(string,"fxp0")
> > so for now I stick in a 
> > 	#define BOOTP_WIRED_TO "fxp0" 
> > in the code.
> > 
> > I need the quotes passed through or made to happen someway.
> 
> hmm... try:
> options	"BOOTP_WIRED_TO=#fxp0"
> 
> this is gcc specific as far as preprocessors go IIRC...
> 
I guess, it will not help because gcc must allow use of # only
in macro definitions. A working method (working with any ANSI C
preprocessor) will be like this:

options "BOOTP_WIRED_TO=fxp0"

#define qw(x) #x

strcmp(string,qw(BOOTP_WIRED_TO));

-SB



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic