[Rcpp-commits] r905 - in pkg/Rcpp: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 15 19:46:38 CET 2010


Author: edd
Date: 2010-03-15 19:46:38 +0100 (Mon, 15 Mar 2010)
New Revision: 905

Modified:
   pkg/Rcpp/NEWS
   pkg/Rcpp/R/RcppLdpath.R
   pkg/Rcpp/inst/ChangeLog
Log:
switch to shortPathName() on Windows to protect pathnames with spaces


Modified: pkg/Rcpp/NEWS
===================================================================
--- pkg/Rcpp/NEWS	2010-03-15 18:40:38 UTC (rev 904)
+++ pkg/Rcpp/NEWS	2010-03-15 18:46:38 UTC (rev 905)
@@ -8,7 +8,7 @@
 	Pairlist constructor has been updated to 20 (was 5) and a script has been
 	added to the source tree should we want to change it again
 
-    o   reversed attempt to protect Windows paths with spaces
+    o   use shortPathName() to protect Windows paths with spaces 
 
 0.7.9   2010-03-12
 

Modified: pkg/Rcpp/R/RcppLdpath.R
===================================================================
--- pkg/Rcpp/R/RcppLdpath.R	2010-03-15 18:40:38 UTC (rev 904)
+++ pkg/Rcpp/R/RcppLdpath.R	2010-03-15 18:46:38 UTC (rev 905)
@@ -21,9 +21,9 @@
     rcppdir <- RcppLdPath()
     if (static) {                               # static is default on Windows and OS X
         flags <- paste(rcppdir, "/libRcpp.a", sep="")
-        #if (.Platform$OS.type=="windows") {
-        #    flags <- paste('"', flags, '"', sep="")
-        #}
+        if (.Platform$OS.type=="windows") {
+            flags <- shortPathName(flags)
+        }
     } else {					# else for dynamic linking
         flags <- paste("-L", rcppdir, " -lRcpp", sep="") # baseline setting
         if ((.Platform$OS.type == "unix") &&    # on Linux, we can use rpath to encode path
@@ -40,9 +40,9 @@
 ## Provide compiler flags -- i.e. -I/path/to/Rcpp.h
 RcppCxxFlags <- function(cxx0x=FALSE) {
     path <- RcppLdPath()
-    #if (.Platform$OS.type=="windows") {
-    #    path <- paste('"', path, '"', sep="")
-    #}
+    if (.Platform$OS.type=="windows") {
+        path <- shortPathName(path)
+    }
     paste("-I", path, if( cxx0x && canUseCXX0X() ) " -std=c++0x" else "", sep="")
 }
 

Modified: pkg/Rcpp/inst/ChangeLog
===================================================================
--- pkg/Rcpp/inst/ChangeLog	2010-03-15 18:40:38 UTC (rev 904)
+++ pkg/Rcpp/inst/ChangeLog	2010-03-15 18:46:38 UTC (rev 905)
@@ -1,6 +1,6 @@
 2010-03-15  Dirk Eddelbuettel  <edd at debian.org>
 
-	* RcppLdpath.R: Remove attempt to protect spaces Windows pathnames
+	* RcppLdpath.R: Use shortPathName() to protect spaces in Windows pathnames
 
 2010-03-15  Romain Francois <romain at r-enthusiasts.com>
 



More information about the Rcpp-commits mailing list