[Rd] src/main/arithmetic.c on OpenBSD (PR#863)

ian@darwinsys.com ian@darwinsys.com
Wed, 7 Mar 2001 01:50:06 +0100 (MET)


First, let me say how glad I am to discover R! As a former user of S
at the University of Toronto and, briefly S-Plus from StatSci (I had
a binary version of that on Slolaris for a while), I was really glad
to find the "R" project.

This is perhaps not your bug, but I did have one minor glitch in
compiling R. OpenBSD 2.8's math.h does not export the "struct
exception" unless you define __LIBM_PRIVATE. The attached patch is
all that is needed to make it compile. Feel free to apply this patch
in future releases, or not (maybe with "#ifdef __OpenBSD__" around it).

Again, thanks for the software.

Ian Darwin
ian@darwinsys.com

--- src/main/arithmetic.c.orig	Tue Mar  6 17:58:18 2001
+++ src/main/arithmetic.c	Tue Mar  6 18:27:38 2001
@@ -22,7 +22,9 @@
 #include <config.h>
 #endif
 
-#include "Defn.h"		/*-> Arith.h */
+#define __LIBM_PRIVATE	/* OpenBSD -> for definition of "struct exception" */
+#include "Defn.h"		/*-> Arith.h -> math.h */
+#undef __LIBM_PRIVATE	
 #define MATHLIB_PRIVATE
 #include <Rmath.h>
 #undef MATHLIB_PRIVATE

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