[Rd] Re: [R] Nothing can be pasted...
Luke Tierney
luke@goose.stat.umn.edu
Thu, 28 Sep 2000 10:12:18 -0500 (CDT)
Peter Dalgaard BSA wrote:
> Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
>
> > > which I didn't see with RH6.2. However, R seems to run just fine
> > > nevertheless. The offending line in config.h is
> > >
> > > #define DYNLOADEXT "." ## SHLIBEXT
> > >
> > > I'm not too familiar with C programming, but if ## SHLIBEXT
> > > is meant as a comment, shouldn't it be surrounded by /* */?
> >
>
> > I wonder if this is a problem with using a beta compiler?
>
> I certainly wouldn't put such a goof beyond RedHat, but it might be a
> question of tighter standards compliance. What happens if the spaces
> around ## are removed? (The error message might read as "can't paste
> onto a whitespace token")
>
White space should be fine, from my reading of Harbison & Steele at least.
The old KR way of doing token concatenation was
#define CONCAT(x,y) x/**/y
and there leaving white space would not work, but with the ## operator
#define CONCAT(x,y) x##y
and
#define CONCAT(x,y) x ## y
should be equivalent.
Since the two bits are literal strings, it would also be possible to define
#define DYNLOADEXT "." SHLIBEXT
My fear is that the preprocessor is complaining about SHLIBEXT being
defined but empty because of a configure problem.
luke
--
Luke Tierney
University of Minnesota Phone: 612-625-7843
School of Statistics Fax: 612-624-8868
313 Ford Hall, 224 Church St. S.E. email: luke@stat.umn.edu
Minneapolis, MN 55455 USA WWW: http://www.stat.umn.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._