[cmake-commits] hoffman committed cmSystemTools.cxx 1.341 1.342

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jul 30 22:51:23 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv25623/Source

Modified Files:
	cmSystemTools.cxx 
Log Message:
ENH: use gnu tar for cygwin


Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.341
retrieving revision 1.342
diff -u -d -r1.341 -r1.342
--- cmSystemTools.cxx	16 Jul 2007 19:10:40 -0000	1.341
+++ cmSystemTools.cxx	31 Jul 2007 02:51:21 -0000	1.342
@@ -1685,11 +1685,18 @@
   char* realName = new char[ strlen(outFileName) + 1 ];
   std::auto_ptr<char> realNamePtr(realName);
   strcpy(realName, outFileName);
+  int options = 0;
+  if(verbose)
+    {
+    options |= TAR_VERBOSE;
+    }
+#ifdef __CYGWIN__
+  options |= TAR_GNU;
+#endif 
   if (tar_open(&t, realName,
       (gzip? &gztype : NULL),
       O_WRONLY | O_CREAT, 0644,
-      (verbose?TAR_VERBOSE:0)
-      | 0) == -1)
+      options) == -1)
     {
     cmSystemTools::Error("Problem with tar_open(): ", strerror(errno));
     return false;



More information about the Cmake-commits mailing list