definition of R_problem_buf in S.h (PR#210)

vogels@ieee.org vogels@ieee.org
Mon, 14 Jun 1999 17:56:06 +0200 (MET DST)


Full_Name: Thomas Vogels
Version: 0.64.1
OS: AIX 4.2
Submission from: (NULL) (198.133.22.70)


R_problem_buf is defined, not just declared, in S.h:

#define R_PROBLEM_BUFSIZE 4096
char R_problem_buf[R_PROBLEM_BUFSIZE];

This is bad since every time S.h is included this buffer is defined.  The
linker
will eventually complain about multiple definitions of this symbol.

Solution: declare R_problem_buf to be extern in S.h, then allocate memory for
it
in a source file, like main.c with: char R_problem_buf[R_PROBLEM_BUFSIZE];



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._