[Rcpp-commits] r2829 - in pkg/Rcpp: . inst src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 4 19:39:01 CET 2011


Author: edd
Date: 2011-01-04 19:39:01 +0100 (Tue, 04 Jan 2011)
New Revision: 2829

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/NEWS
   pkg/Rcpp/src/debugging.cpp
Log:
treat the *BSD variants like Windows and provide file and line nb but no stacktrace


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2011-01-04 15:56:14 UTC (rev 2828)
+++ pkg/Rcpp/ChangeLog	2011-01-04 18:39:01 UTC (rev 2829)
@@ -1,5 +1,8 @@
 2011-01-04  Dirk Eddelbuettel  <edd at debian.org>
 
+	* src/debugging.cpp: Treat the *BSD flavours like Windows and offer
+	file and line number but not stack trace (for lack of execinfo)
+
 	* src/Makevars: Replace implicit variable $^ with explicit list
 
 2011-01-02  Dirk Eddelbuettel  <edd at debian.org>

Modified: pkg/Rcpp/inst/NEWS
===================================================================
--- pkg/Rcpp/inst/NEWS	2011-01-04 15:56:14 UTC (rev 2828)
+++ pkg/Rcpp/inst/NEWS	2011-01-04 18:39:01 UTC (rev 2829)
@@ -3,6 +3,9 @@
     o   Removed another GNU Make-specific variable from src/Makevars in order
         to make the build more portable; this was noticed on FreeBSD
 
+    o   On *BSD, do not try to compute a stack trace but provide file and
+        line number (which is the same behaviour as implemented in Windows)
+
 0.9.0   2010-12-19
 
     o   The classic API was factored out into its own package RcppClassic which

Modified: pkg/Rcpp/src/debugging.cpp
===================================================================
--- pkg/Rcpp/src/debugging.cpp	2011-01-04 15:56:14 UTC (rev 2828)
+++ pkg/Rcpp/src/debugging.cpp	2011-01-04 18:39:01 UTC (rev 2829)
@@ -22,17 +22,17 @@
 #include <Rcpp.h>
 
 #if defined(__GNUC__)
-#if defined(WIN32)
-/* silly version for windows */
+#if defined(WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+// Simpler version for Windows and *BSD 
 SEXP stack_trace( const char* file, int line ){
     Rcpp::List trace = Rcpp::List::create( 
     	Rcpp::Named( "file"  ) = file, 
     	Rcpp::Named( "line"  ) = line, 
-    	Rcpp::Named( "stack" ) = "C++ stack not available on windows (mingw does not have the execinfo.h file)" ) ;
+    	Rcpp::Named( "stack" ) = "C++ stack not available on this system" ) ;
     trace.attr("class") = "Rcpp_stack_trace" ;
     return trace ;
 }
-#else /* !defined(WIN32) */ 
+#else // ! (defined(WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 
 #include <execinfo.h>
 #include <cxxabi.h>
 



More information about the Rcpp-commits mailing list