[R] Compiling R on Sunos

Ben Bolker ben at eno.Princeton.EDU
Wed Feb 24 21:07:54 CET 1999


On Wed, 24 Feb 1999 faulkner at eco.utexas.edu wrote:

> I'm looking for some help in getting R to compile on Sunos. 


  If you want a patch in the meantime (rather than getting the newest
release version), try using the following patch (in src/nmath).  (This
just hand-defines RAND_MAX and changes NULL to 0.) 

  It worked for me on release 0.63.1, SunOS 4.1.4.


*** sunif.c.orig        Sat Jan  2 15:16:12 1999
--- sunif.c     Sat Jan  2 15:24:40 1999
***************
*** 46,51 ****
--- 46,53 ----
  
  Int32 dummy[3];
  
+ #define RAND_MAX 4294967295    /* 2^32-1; works on SunOS 4.1.4 */
+ 
  RNGTAB RNG_Table[] =
  {
  /* kind         name          is_seeded seed-length   i1_s, *seed-vec */
***************
*** 210,216 ****
  
      MaybeAllocSeeds(kind);
  
!     srand((int)time(NULL));
      
      RNG_Init(kind, (long) rand() | 01/* odd */);
  }
--- 212,218 ----
  
      MaybeAllocSeeds(kind);
  
!     srand((int)time(0));
      
      RNG_Init(kind, (long) rand() | 01/* odd */);
  }


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list