RODBC patchlet

Kurt Hornik Kurt.Hornik@wu-wien.ac.at
Mon, 28 Oct 2002 07:19:56 +0100


>>>>> Dirk Eddelbuettel writes:

> [ Disclaimer: Yes, I do know that RODBC is in a state of minor limbo
> as far as maintenance is concerned. But it is also useful, and used,
> which is why I hope that someone might apply the small change outlined
> below. ]

> The current version in CRAN's devel directories fails to build under R
> 1.6.1 (beta from Oct 27):

> chibud:/home/edd/RODBC# R CMD INSTALL .
> * Installing *source* package 'RODBC' ...
> creating cache ./config.cache
> checking for library containing SQLTables... -lodbc
> updating cache ./config.cache
> creating ./config.status
> creating src/Makevars
> ** libs
> gcc -I/usr/lib/R/include   -D__NO_MATH_INLINES -mieee-fp  -fPIC  -g -O2 -c RODBC.c -o RODBC.o
> RODBC.c:22: parse error
> make: *** [RODBC.o] Error 1
> ERROR: compilation failed for package 'RODBC'

> My quick solution was to #ifdef the following block of RODBC.c away:

> #if 0
> #if R_VERSION < R_Version(1, 2, 0)
> # define STRING_ELT(x,i)        (STRING(x)[i])
> # define VECTOR_ELT(x,i)        (VECTOR(x)[i])
> # define SET_STRING_ELT(x,i,v)  (STRING(x)[i] = (v))
> # define SET_VECTOR_ELT(x,i,v)  (VECTOR(x)[i] = (v))
> #endif
> #endif

> I'm sure there is a nicer solution, but it is immediately apparent to
> me. The gcc version which puked is 2.95.4 as in Debian testing.

This is basically the right solution: even better is to remove the < 1.2
code and add a Depends on R (>= 1.2) to DESCRIPTION.

Otoh, CRAN only accepts packages which are actively maintained, so we do
need a volunteer to step in.

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