Thanks. That means that the platform you are using has non-POSIX
datetime functions, BTW, and a case I coded for hypothetically
actually exists. Strange that it should be a GNU-LINUX system,
though.
Fixed for 1.2.3.
On Mon, 9 Apr 2001 ntakebay@bio.indiana.edu wrote:
> Full_Name: Naoki Takebayashi
> Version: 1.2.2
> OS: Linux, RedHat 7.0/alpha
> Submission from: (NULL) (152.3.12.123)
>
>
> With RedHat 7.0/alpha (gcc 2.96-69), I encountered following error:
>
> gcc -I. -I../../src/include -I../../src/include -I/usr/local/include
> -DHAVE_CONFIG_H -mieee -O2 -mieee -c datetime.c -o datetime.o
> datetime.c: In function `do_systime':
> datetime.c:306: parse error before `ans'
> datetime.c:307: `ans' undeclared (first use in this function)
> datetime.c:307: (Each undeclared identifier is reported only once
> datetime.c:307: for each function it appears in.)
> make[3]: *** [datetime.o] Error 1
> make[3]: Leaving directory `/usr/src/redhat/BUILD/R-1.2.2/src/main'
>
> Following patch fixes this syntax error.
>
> --- R-1.2.2/src/main/datetime.c.orig Mon Apr 9 11:24:14 2001
> +++ R-1.2.2/src/main/datetime.c Mon Apr 9 11:25:11 2001
> @@ -300,10 +300,10 @@
> SEXP do_systime(SEXP call, SEXP op, SEXP args, SEXP env)
> {
> time_t res = time(NULL);
> + SEXP ans = allocVector(REALSXP, 1);
> #ifdef USING_LEAPSECONDS
> res -= 22;
> #endif
> - SEXP ans = allocVector(REALSXP, 1);
> if(res != (time_t)(-1)) REAL(ans)[0] = (double) res;
> else REAL(ans)[0] = NA_REAL;
> return ans;
>
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._