Date: Sun, 22 Sep 1996 10:46:57 +1000 From: Bruce Evans <bde@zeta.org.au> To: freebsd-hackers@freefall.freebsd.org, gilham@csl.sri.com Subject: Re: Problem with rpcgen (resolved, sort of) Message-ID: <199609220046.KAA00135@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>At any rate, after considerable head-scratching I've traced the >problem to GNU CPP's habit of removing the backslash/newline pairs in >all circumstances. It turns out that rpcgen runs cpp as a front-end, >and on FreeBSD, unlike SunOS and Solaris 2, the GNU preprocessor is >used. So if anyone had tried to investingate this behavior, there's >no need. rpcgen runs /usr/libexec/cpp, which is an ANSI standard cpp, so it is required to remove backslash/newline pairs in all circumstances. rpcgen should probably run /usr/bin/cpp or invoke /usr/lib/cpp with the -traditional flag to get a traditional cpp. /usr/bin/cpp invokes /usr/libexec/cpp with several other options: /usr/libexec/cpp -traditional -D__GNUC__=2 -$ -nostdinc -I/usr/include `-D__GNUC__=2' gives the main predefine that cc would give. #ifdefs that depend on other predefines will break. -$ stops `$' from being an ordinary character in identifiers. `-nostdinc -I/usr/' restricts the #include search to /usr/include (which is close to the default anyway, since FreeBSD changes the gnu defaults to just /usr/include:/usr/include/g++). None of these options except possibly -$ is quite right for preprocessing non-C code. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609220046.KAA00135>