[Rcpp-commits] r4182 - in pkg/Rcpp: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 31 04:59:39 CET 2012


Author: edd
Date: 2012-12-31 04:59:39 +0100 (Mon, 31 Dec 2012)
New Revision: 4182

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/src/Timer.cpp
Log:
Added defined() tests for more *BSD family members as the build also failed with the FreeBSD Kernel on Debian


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-12-30 15:57:47 UTC (rev 4181)
+++ pkg/Rcpp/ChangeLog	2012-12-31 03:59:39 UTC (rev 4182)
@@ -1,3 +1,8 @@
+2012-12-30  Dirk Eddelbuettel  <edd at debian.org>
+
+	* src/Timer.cpp (Rcpp): Added defined() tests for more *BSD family
+	members as the build also failed with the FreeBSD Kernel on Debian
+
 2012-12-27  Dirk Eddelbuettel  <edd at debian.org>
 
 	* src/Timer.cpp (Rcpp): Applied patch kindly supplied by Rainer

Modified: pkg/Rcpp/src/Timer.cpp
===================================================================
--- pkg/Rcpp/src/Timer.cpp	2012-12-30 15:57:47 UTC (rev 4181)
+++ pkg/Rcpp/src/Timer.cpp	2012-12-31 03:59:39 UTC (rev 4182)
@@ -27,7 +27,7 @@
     #include <windows.h>
 #elif defined(__MACH__) || defined(__APPLE__)
     #include <mach/mach_time.h>
-#elif defined(linux) || defined(__linux) || defined(__FreeBSD__)
+#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
     #include <time.h>
 #elif defined(sun) || defined(__sun) || defined(_AIX)
     #include <sys/time.h>
@@ -61,8 +61,9 @@
         /* Convert to nanoseconds */
         return time * (info.numer / info.denom);
     }
-#elif defined(linux) || defined(__linux) || defined(__FreeBSD__)
 
+#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
+
     static const nanotime_t nanoseconds_in_second = 1000000000LL;
     
     nanotime_t get_nanotime(void) {



More information about the Rcpp-commits mailing list