Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 1998 11:18:16 -0500
From:      sbabkin@dcn.att.com
To:        ambrisko@whistle.com, gurney_j@resnet.uoregon.edu
Cc:        hackers@FreeBSD.ORG
Subject:   RE: a chicken-egg problem with bootp and nfs_mountroot
Message-ID:  <C50B6FBA632FD111AF0F0000C0AD71EE4132BF@dcn71.dcn.att.com>

next in thread | raw e-mail | index | archive | help
> ----------
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C50B6FBA632FD111AF0F0000C0AD71EE4132BF>