[darwinbuild-changes] [468] branches/PR-6497694/darwinup/Depot.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jan 27 18:26:47 PST 2009
Revision: 468
http://trac.macosforge.org/projects/darwinbuild/changeset/468
Author: wsiegrist at apple.com
Date: 2009-01-27 18:26:46 -0800 (Tue, 27 Jan 2009)
Log Message:
-----------
Only calculate numfiles once. Improve the comment.
Modified Paths:
--------------
branches/PR-6497694/darwinup/Depot.cpp
Modified: branches/PR-6497694/darwinup/Depot.cpp
===================================================================
--- branches/PR-6497694/darwinup/Depot.cpp 2009-01-28 02:20:36 UTC (rev 467)
+++ branches/PR-6497694/darwinup/Depot.cpp 2009-01-28 02:26:46 UTC (rev 468)
@@ -425,7 +425,8 @@
// XXX: res = file->backup()
- // Copy libraries gnutar uses since we need to use gnutar before they are replaced
+ // copy files used by gnutar and libarchive instead of moving them
+ // since we use tar during the archive process
size_t i = 0;
bool docopy = false;
const char* tarfiles[] = {"/usr/bin/tar",
@@ -437,7 +438,8 @@
"/usr/lib/libSystem.B.dylib",
"/usr/lib/libiconv.2.dylib",
"/usr/lib/libgcc_s.1.dylib"};
- for (i = 0; i < sizeof(tarfiles)/sizeof(*tarfiles); i++) {
+ size_t numfiles = sizeof(tarfiles)/sizeof(*tarfiles);
+ for (i = 0; i < numfiles; i++) {
if (strncmp(tarfiles[i], file->path(), strlen(tarfiles[i])) == 0) {
docopy = true;
break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20090127/a7eb962e/attachment-0001.html>
More information about the darwinbuild-changes
mailing list