RODBC patchlet

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Mon, 28 Oct 2002 07:10:03 +0000 (GMT)


Much more is needed.  I do plan to do produce an update fairly soon,
and as I don't have any current use of this under Unix, I will run it by
you if I may.

Brian

On Sun, 27 Oct 2002, Dirk Eddelbuettel wrote:

>
> [ 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:

Well, the 160update.txt on the developer site (and the NEWS file) tells
you that you need to include Rversion.h.

> #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.
>
> Dirk
>
> --
> The only function of economic forecasting is to make astrology
> look respectable.                    -- John Kenneth Galbraith
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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