[darwinbuild-changes] [428] trunk
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 9 16:03:07 PST 2008
Revision: 428
http://trac.macosforge.org/projects/darwinbuild/changeset/428
Author: wsiegrist at apple.com
Date: 2008-12-09 16:03:07 -0800 (Tue, 09 Dec 2008)
Log Message:
-----------
Merging PR-6392966...
* Darwinup can be used to replace libSystem now
* All building is done with -Werror
* darwinxref info no longer crashes
Modified Paths:
--------------
trunk/VERSION
trunk/darwinbuild/Makefile
trunk/darwinbuild/darwinbuild
trunk/darwinbuild/manifest.c
trunk/darwintrace/Makefile
trunk/darwinup/Depot.cpp
trunk/darwinup/Digest.cpp
trunk/darwinup/File.cpp
trunk/darwinup/Makefile
trunk/darwinup/main.cpp
trunk/darwinxref/DBDataStore.c
trunk/darwinxref/DBPlugin.c
trunk/darwinxref/DBPluginPriv.h
trunk/darwinxref/Makefile
trunk/darwinxref/cfutils.c
trunk/darwinxref/main.c
trunk/darwinxref/plugins/diff.c
trunk/darwinxref/plugins/dot.c
trunk/darwinxref/plugins/exportFiles.c
trunk/darwinxref/plugins/exportProject.c
trunk/darwinxref/plugins/findFile.c
trunk/darwinxref/plugins/loadDeps.c
trunk/darwinxref/plugins/loadFiles.c
trunk/darwinxref/plugins/loadIndex.c
trunk/darwinxref/plugins/register.c
trunk/darwinxref/plugins/resolveDeps.c
trunk/darwinxref/upgrade_plist.c
Added Paths:
-----------
trunk/darwinxref/DBDataStore.h
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388:399-419
+ /branches/PR-4841388:399-419
/branches/PR-6392966:423-427
Modified: trunk/VERSION
===================================================================
--- trunk/VERSION 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/VERSION 2008-12-10 00:03:07 UTC (rev 428)
@@ -1 +1 @@
-0.7.2
+0.8.0
Modified: trunk/darwinbuild/Makefile
===================================================================
--- trunk/darwinbuild/Makefile 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinbuild/Makefile 2008-12-10 00:03:07 UTC (rev 428)
@@ -8,7 +8,7 @@
all: manifest
manifest: manifest.c
- cc -o $(OBJROOT)/$@ -lcrypto $^
+ cc -Wall -Werror -o $(OBJROOT)/$@ -lcrypto $^
install: all
[ -d $(BINDIR) ] || $(INSTALL) -d $(INSTALL_DIR_FLAGS) $(BINDIR)
Modified: trunk/darwinbuild/darwinbuild
===================================================================
--- trunk/darwinbuild/darwinbuild 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinbuild/darwinbuild 2008-12-10 00:03:07 UTC (rev 428)
@@ -105,7 +105,6 @@
projnam=""
action="install"
target=""
-configuration=""
version=""
###
@@ -168,7 +167,7 @@
function PrintUsage() {
cat <<-EOF 1>&2
usage: $(basename $0) [flags] <project> [<version>]
- usage: flags: [-headers] [-build=X] [-target=X] [-configuration=X]
+ usage: flags: [-headers] [-build=X] [-target=X]
[-logdeps] [-nochroot] [-nopatch] [-noload | -loadonly]
[-depsbuild=X [-depsbuild=Y]]
[-fetch] [-source] [-load]
@@ -222,7 +221,6 @@
### don't build.
### -logdeps Do magic to log the build-time dependencies
### -target=X The makefile or xcode target to build
-### -configuration=X The build configuration to use
### -build=X X is the darwin build number to buld, e.g. 8B15
### -depsbuild=X X is the darwin build number to populate the BuildRoot
### <project> The name of the project to build
@@ -248,8 +246,6 @@
action="source"
elif [ "${ARG/=*/}" == "-target" ]; then
target="${ARG/*=/}"
- elif [ "${ARG/=*/}" == "-configuration" ]; then
- configuration="${ARG/*=/}"
elif [ "${ARG/=*/}" == "-build" ]; then
build="${ARG/*=/}"
elif [ "${ARG/=*/}" == "-depsbuild" ]; then
@@ -346,13 +342,6 @@
fi
#
-# Look for an alternate build configuration in the database
-#
-if [ "$configuration" == "" -a "$action" == "install" ]; then
- configuration=$($DARWINXREF configuration "$projnam")
-fi
-
-#
# Sanity check to make sure we actually have a project to build.
#
if [ "$project" == "" ]; then
@@ -623,14 +612,6 @@
action="$target"
fi
-#
-# append build configuration to $action, if any
-# this is only applicable to xcodebuild
-#
-if [ "$buildtool" == "xcodebuild" -a "$configuration" != "" ]; then
- build_string="$build_string -configuration $configuration"
-fi
-
###
### Write out the build script that will be used.
### This may or may not be executed in a chroot.
Modified: trunk/darwinbuild/manifest.c
===================================================================
--- trunk/darwinbuild/manifest.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinbuild/manifest.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -56,8 +56,8 @@
m[4], m[5], m[6], m[7],
m[8], m[9], m[10], m[11],
m[12], m[13], m[14], m[15],
- m[16], m[17], m[18], m[19]
- );
+ m[16], m[17], m[18], m[19]
+ );
return result;
}
@@ -139,7 +139,6 @@
char filename[MAXPATHLEN+1];
char symlink[MAXPATHLEN+1];
int len;
- off_t size;
// Filename
filename[0] = 0;
@@ -182,4 +181,6 @@
free(checksum);
}
fts_close(fts);
-}
\ No newline at end of file
+
+ return 0;
+}
Modified: trunk/darwintrace/Makefile
===================================================================
--- trunk/darwintrace/Makefile 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwintrace/Makefile 2008-12-10 00:03:07 UTC (rev 428)
@@ -21,7 +21,7 @@
darwintrace.dylib: darwintrace.c
cc -o $(OBJROOT)/$@ \
$(ARCHS) \
- -W -Wall -pedantic -std=c99 \
+ -Wall -Werror -pedantic -std=c99 \
-flat_namespace \
-fno-common \
$(CFLAGS) \
Modified: trunk/darwinup/Depot.cpp
===================================================================
--- trunk/darwinup/Depot.cpp 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinup/Depot.cpp 2008-12-10 00:03:07 UTC (rev 428)
@@ -28,6 +28,7 @@
#include "Utils.h"
#include <assert.h>
+#include <copyfile.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
@@ -230,7 +231,7 @@
if (blobsize > 0) {
digest = new Digest();
digest->m_size = blobsize;
- memcpy(digest->m_data, blob, (blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
+ memcpy(digest->m_data, blob, ((size_t)blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
}
File* file = FileFactory(serial, archive, info, (const char*)path, mode, uid, gid, size, digest);
@@ -421,8 +422,27 @@
++context->files_modified;
// XXX: res = file->backup()
- IF_DEBUG("[backup] rename(%s, %s)\n", file->path(), dstpath);
- res = rename(file->path(), dstpath);
+
+ // Copy libraries gnutar uses since we need to use gnutar before they are replaced
+ int i = 0;
+ bool docopy = false;
+ const char* tarlibs[] = {"/usr/lib/libSystem.B.dylib",
+ "/usr/lib/libiconv.2.dylib",
+ "/usr/lib/libgcc_s.1.dylib"};
+ for (i = 0; i < 3; i++) {
+ if (strncmp(tarlibs[i], file->path(), strlen(tarlibs[i])) == 0) {
+ docopy = true;
+ break;
+ }
+ }
+ if (docopy) {
+ IF_DEBUG("[backup] copyfile(%s, %s)\n", file->path(), dstpath);
+ res = copyfile(file->path(), dstpath, NULL, COPYFILE_ALL);
+ } else {
+ IF_DEBUG("[backup] rename(%s, %s)\n", file->path(), dstpath);
+ res = rename(file->path(), dstpath);
+ }
+
if (res != 0) fprintf(stderr, "%s:%d: backup failed: %s: %s (%d)\n", __FILE__, __LINE__, dstpath, strerror(errno), errno);
free(dstpath);
}
@@ -676,7 +696,7 @@
if (res == 0) res = this->iterate_files(archive, &Depot::uninstall_file, &context);
if (res == 0) res = this->begin_transaction();
- int i;
+ uint32_t i;
for (i = 0; i < context.files_to_remove->count; ++i) {
uint64_t serial = context.files_to_remove->values[i];
IF_DEBUG("deleting file %lld\n", serial);
@@ -819,7 +839,7 @@
if (blobsize > 0) {
digest = new Digest();
digest->m_size = blobsize;
- memcpy(digest->m_data, blob, (blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
+ memcpy(digest->m_data, blob, ((size_t)blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
}
Archive* archive = this->archive(archive_serial);
Modified: trunk/darwinup/Digest.cpp
===================================================================
--- trunk/darwinup/Digest.cpp 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinup/Digest.cpp 2008-12-10 00:03:07 UTC (rev 428)
@@ -90,7 +90,7 @@
char* Digest::string() {
static const char* hexabet = "0123456789abcdef";
char* result = (char*)malloc(2*m_size+1);
- int i, j;
+ uint32_t i, j;
for (i = 0, j = 0; i < m_size; ++i) {
result[j++] = hexabet[(m_data[i] & 0xF0) >> 4];
@@ -105,7 +105,7 @@
if (a == b) return 1;
if (a == NULL) return 0;
if (b == NULL) return 0;
- int a_size = a->size();
+ uint32_t a_size = a->size();
if (a_size != b->size()) {
return 0;
}
@@ -153,7 +153,6 @@
SHA1DigestMachO::SHA1DigestMachO(const char* filename) {
- char* res = NULL;
char* error = NULL;
// Check for Mach-O
Modified: trunk/darwinup/File.cpp
===================================================================
--- trunk/darwinup/File.cpp 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinup/File.cpp 2008-12-10 00:03:07 UTC (rev 428)
@@ -142,7 +142,7 @@
const char* dstpath = this->path();
if (dirpath) {
ssize_t len = snprintf(srcpath, sizeof(srcpath), "%s/%s", dirpath, dstpath);
- if (len > sizeof(srcpath)) {
+ if ((size_t)len > sizeof(srcpath)) {
fprintf(stderr, "ERROR: [install] path too long: %s/%s\n", dirpath, dstpath);
return -1;
}
@@ -257,7 +257,7 @@
int Symlink::install_info() {
int res = 0;
const char* path = this->path();
- mode_t mode = this->mode() & ALLPERMS;
+ //mode_t mode = this->mode() & ALLPERMS;
uid_t uid = this->uid();
gid_t gid = this->gid();
IF_DEBUG("[install] lchown(%d, %d)\n", uid, gid);
@@ -348,7 +348,7 @@
break;
case FTS_DEFAULT:
case FTS_DNR:
- fprintf(stderr, "%s:%d: could not read directory. Run as root.\n", __FILE__, __LINE__, ent->fts_info);
+ fprintf(stderr, "%s:%d: could not read directory. Run as root.\n", __FILE__, __LINE__);
break;
default:
fprintf(stderr, "%s:%d: unexpected fts_info type %d\n", __FILE__, __LINE__, ent->fts_info);
Modified: trunk/darwinup/Makefile
===================================================================
--- trunk/darwinup/Makefile 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinup/Makefile 2008-12-10 00:03:07 UTC (rev 428)
@@ -1,6 +1,6 @@
include ../common.mk
-CXXFLAGS=-g
+CXXFLAGS=-g -Wall -Werror
# libredo.o is generated from cctools_ofiles
REDO=$(shell if [ -f /usr/local/lib/libredo_prebinding.a ]; then \
echo /usr/local/lib/libredo_prebinding.a ; else \
Modified: trunk/darwinup/main.cpp
===================================================================
--- trunk/darwinup/main.cpp 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinup/main.cpp 2008-12-10 00:03:07 UTC (rev 428)
@@ -33,14 +33,14 @@
void usage(char* progname) {
char* pad = strdup(progname);
- int i;
+ size_t i;
for (i = 0; i < strlen(pad); ++i) pad[i] = ' ';
fprintf(stderr, "usage: %s install <path>\n", progname);
- fprintf(stderr, " %s list\n", pad, progname);
- fprintf(stderr, " %s files <uuid>\n", pad, progname);
- fprintf(stderr, " %s uninstall <uuid>\n", pad, progname);
- fprintf(stderr, " %s verify <uuid>\n", pad, progname);
+ fprintf(stderr, " %s list\n", pad);
+ fprintf(stderr, " %s files <uuid>\n", pad);
+ fprintf(stderr, " %s uninstall <uuid>\n", pad);
+ fprintf(stderr, " %s verify <uuid>\n", pad);
exit(1);
}
Modified: trunk/darwinxref/DBDataStore.c
===================================================================
--- trunk/darwinxref/DBDataStore.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/DBDataStore.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -124,7 +124,6 @@
CFDataRef data = NULL;
sqlite3_stmt* stmt = NULL;
va_list args;
- char* errmsg;
va_start(args, fmt);
sqlite3* db = _DBPluginGetDataStorePtr();
if (db) {
@@ -802,7 +801,6 @@
CFStringRef prop = CFArrayGetValueAtIndex(existingProps, i);
if (!CFArrayContainsValue(props, range, prop)) {
char* cbuild = strdup_cfstr(build);
- char* cproj = strdup_cfstr(project);
char* cprop = strdup_cfstr(prop);
if (project) {
char* cproj = strdup_cfstr(project);
Added: trunk/darwinxref/DBDataStore.h
===================================================================
--- trunk/darwinxref/DBDataStore.h (rev 0)
+++ trunk/darwinxref/DBDataStore.h 2008-12-10 00:03:07 UTC (rev 428)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_BSD_LICENSE_HEADER_START@
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @APPLE_BSD_LICENSE_HEADER_END@
+ */
+
+#ifndef __DARWINBUILD_DATASTORE_H__
+#define __DARWINBUILD_DATASTORE_H__
+
+#include "sqlite3.h"
+
+int SQL(const char* fmt, ...);
+int SQL_BOOLEAN(const char* fmt, ...);
+int SQL_CALLBACK(sqlite3_callback callback, void* context, const char* fmt, ...);
+void SQL_NOERR(char* sql);
+char* SQL_STRING(const char* fmt, ...);
+
+void* _DBPluginGetDataStorePtr();
+
+#endif
Modified: trunk/darwinxref/DBPlugin.c
===================================================================
--- trunk/darwinxref/DBPlugin.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/DBPlugin.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -118,6 +118,13 @@
return plugin;
}
+//////
+//
+// DBPluginLoadPlugins
+// returns -1 if the plugin dictionary cannot be
+// created, otherwise returns 0
+//
+/////
int DBPluginLoadPlugins(const char* plugin_path) {
if (plugins == NULL) {
plugins = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &cfDictionaryPluginValueCallBacks);
@@ -188,6 +195,8 @@
free(path_argv[i]);
}
free(path_argv);
+
+ return 0;
}
void print_usage(char* progname, int argc, char* argv[]) {
@@ -308,4 +317,5 @@
if (plugin->type == kDBPluginProjectPropertyType) return CFRetain(CFSTR("<project>"));
if (plugin->type == kDBPluginBuildPropertyType) return CFRetain(CFSTR(""));
if (plugin->type == kDBPluginPropertyType) return CFRetain(CFSTR("[<project>]"));
+ return CFRetain(CFSTR("<unknown property type>"));
}
Modified: trunk/darwinxref/DBPluginPriv.h
===================================================================
--- trunk/darwinxref/DBPluginPriv.h 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/DBPluginPriv.h 2008-12-10 00:03:07 UTC (rev 428)
@@ -86,3 +86,6 @@
int run_plugin(int argc, char* argv[]);
int DBDataStoreInitialize(const char* datafile);
void DBSetCurrentBuild(char* build);
+
+void print_usage(char* progname, int argc, char* argv[]);
+
Modified: trunk/darwinxref/Makefile
===================================================================
--- trunk/darwinxref/Makefile 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/Makefile 2008-12-10 00:03:07 UTC (rev 428)
@@ -25,7 +25,7 @@
TCL_CFLAGS=-DHAVE_TCL_PLUGINS=1
TCL_LDFLAGS=-ltcl
-CFLAGS+=-g $(TCL_CFLAGS) -DVERSION=\"$(shell cat ../VERSION)\" $(SQLITEINC)
+CFLAGS+=-g -Wall -Werror $(TCL_CFLAGS) -DVERSION=\""$(shell cat ../VERSION)"\" $(SQLITEINC)
LDFLAGS+=-framework CoreFoundation $(TCL_LDFLAGS)
PLUGIN_CFLAGS=$(CFLAGS) -I.
PLUGIN_LDFLAGS=$(LDFLAGS) -bundle -bundle_loader $(SYMROOT)/darwinxref
Modified: trunk/darwinxref/cfutils.c
===================================================================
--- trunk/darwinxref/cfutils.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/cfutils.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -292,7 +292,7 @@
const char* str = (const char*)value;
unsigned long hash = 5381;
int c;
- while (c = *str++) hash = ((hash << 5) + hash) + c; // hash*33 + c
+ while ((c = *str++)) hash = ((hash << 5) + hash) + c; // hash*33 + c
return hash;
}
CFDictionaryKeyCallBacks cfDictionaryCStringKeyCallBacks = {
Modified: trunk/darwinxref/main.c
===================================================================
--- trunk/darwinxref/main.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/main.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -37,6 +37,7 @@
#include <fcntl.h>
#include <dlfcn.h>
#include <getopt.h>
+#include <libgen.h>
#include "DBPluginPriv.h"
@@ -81,13 +82,16 @@
printf("%s/%s\n", basename(progname), "" VERSION "");
printf("\tcurrent build: %s\n", build);
printf("\tsqlite/%s (%s)\n", sqlite3_version, "UTF-8");
- printf("\tCoreFoundation/%g%s\n", kCFCoreFoundationVersionNumber, NSIsSymbolNameDefined("_CFNotificationCenterGetTypeID") ? "" : " (CF-Lite)");
+ printf("\tCoreFoundation/%g %s\n", kCFCoreFoundationVersionNumber,
+ dlsym(RTLD_DEFAULT, "CFNotificationCenterGetTypeID") ? "" : "(CF-Lite)");
exit(1);
}
DBDataStoreInitialize(dbfile);
DBSetCurrentBuild(build);
- DBPluginLoadPlugins(plugins);
+ if (DBPluginLoadPlugins(plugins) == -1) {
+ fprintf(stderr, "Error: cannot allocate memory for plugins!\n");
+ }
if (run_plugin(argc, argv) == -1) {
print_usage(progname, argc, argv);
exit(1);
Modified: trunk/darwinxref/plugins/diff.c
===================================================================
--- trunk/darwinxref/plugins/diff.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/diff.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -53,7 +53,7 @@
* Diff two project files
*/
int run(CFArrayRef argv) {
- int res = 0;
+
// ensure we have two and only two arguments
CFIndex count = CFArrayGetCount(argv);
if (count != 2) return -1;
Modified: trunk/darwinxref/plugins/dot.c
===================================================================
--- trunk/darwinxref/plugins/dot.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/dot.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -63,6 +63,7 @@
CFRelease(builds);
+ return 0;
}
static CFStringRef usage() {
Modified: trunk/darwinxref/plugins/exportFiles.c
===================================================================
--- trunk/darwinxref/plugins/exportFiles.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/exportFiles.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <stdio.h>
#include <regex.h>
Modified: trunk/darwinxref/plugins/exportProject.c
===================================================================
--- trunk/darwinxref/plugins/exportProject.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/exportProject.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -42,7 +42,6 @@
int xml = 0, i;
CFMutableDictionaryRef dict, preplist;
CFDictionaryRef project;
- char *cproj;
CFStringRef projname;
CFArrayRef builds;
const void *ssites, *bsites;
Modified: trunk/darwinxref/plugins/findFile.c
===================================================================
--- trunk/darwinxref/plugins/findFile.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/findFile.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <stdio.h>
#include <regex.h>
@@ -76,12 +77,11 @@
}
static int findFile(char* file, char* build) {
- char* errmsg;
char project[BUFSIZ];
project[0] = 0;
asprintf(&file, "%%%s", file);
- int res = SQL_CALLBACK(&printFiles, project,
- "SELECT project,path FROM files WHERE build=%Q AND path LIKE %Q ORDER BY project, path",
- build, file);
+ SQL_CALLBACK(&printFiles, project,
+ "SELECT project,path FROM files WHERE build=%Q AND path LIKE %Q ORDER BY project, path",
+ build, file);
return 0;
}
Modified: trunk/darwinxref/plugins/loadDeps.c
===================================================================
--- trunk/darwinxref/plugins/loadDeps.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/loadDeps.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/param.h>
@@ -132,4 +133,6 @@
if (SQL("COMMIT")) { return -1; }
fprintf(stderr, "loaded %d unresolved dependencies.\n", count);
+
+ return 0;
}
Modified: trunk/darwinxref/plugins/loadFiles.c
===================================================================
--- trunk/darwinxref/plugins/loadFiles.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/loadFiles.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <stdio.h>
#include <regex.h>
@@ -39,7 +40,6 @@
static int run(CFArrayRef argv) {
int res = 0;
- CFStringRef project = NULL;
CFIndex count = CFArrayGetCount(argv);
if (count != 1) return -1;
char* filename = strdup_cfstr(CFArrayGetValueAtIndex(argv, 0));
@@ -76,8 +76,6 @@
FILE* fp = fopen(path, "r");
int loaded = 0, total = 0;
if (fp) {
- char* errmsg;
-
//
// Create the projects table if it does not already exist
//
Modified: trunk/darwinxref/plugins/loadIndex.c
===================================================================
--- trunk/darwinxref/plugins/loadIndex.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/loadIndex.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -35,7 +35,6 @@
static int run(CFArrayRef argv) {
int res = 0;
- CFStringRef project = NULL;
CFIndex count = CFArrayGetCount(argv);
if (count != 1) return -1;
char* filename = strdup_cfstr(CFArrayGetValueAtIndex(argv, 0));
Modified: trunk/darwinxref/plugins/register.c
===================================================================
--- trunk/darwinxref/plugins/register.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/register.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/syslimits.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -679,10 +680,11 @@
SQL("DELETE FROM mach_o_objects WHERE build=%Q AND project=%Q", build, project);
SQL("DELETE FROM mach_o_symbols WHERE mach_o_object NOT IN (SELECT serial FROM mach_o_objects)");
+
+ return 0;
}
int register_files(char* build, char* project, char* path) {
- char* errmsg;
int res;
int loaded = 0;
@@ -708,7 +710,6 @@
char filename[MAXPATHLEN+1];
char symlink[MAXPATHLEN+1];
int len;
- off_t size;
// Filename
filename[0] = 0;
@@ -774,7 +775,6 @@
}
int register_files_from_stdin(char* build, char* project, char* path) {
- char* errmsg;
int res;
int loaded = 0;
char *line;
Modified: trunk/darwinxref/plugins/resolveDeps.c
===================================================================
--- trunk/darwinxref/plugins/resolveDeps.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/plugins/resolveDeps.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <sys/types.h>
@@ -172,6 +173,8 @@
}
if (SQL("COMMIT")) { return -1; }
+
+ return 0;
}
int resolve_dependencies(const char* build, const char* project, int commit) {
@@ -201,4 +204,6 @@
CFRelease(builds);
CFRelease(projects);
+
+ return 0;
}
Modified: trunk/darwinxref/upgrade_plist.c
===================================================================
--- trunk/darwinxref/upgrade_plist.c 2008-12-03 22:09:31 UTC (rev 427)
+++ trunk/darwinxref/upgrade_plist.c 2008-12-10 00:03:07 UTC (rev 428)
@@ -74,11 +74,7 @@
int main(int argc, char* argv[]) {
- int res = 0;
char* progname = argv[0];
- char* errmsg;
- char* command = "";
- char* build = NULL;
char* path = (argc-- > 0) ? *++argv : NULL;
@@ -101,7 +97,7 @@
exit(1);
}
- CFIndex i,j;
+ CFIndex i;
CFIndex oldcount = CFArrayGetCount(oldprojs);
for(i = 0; i < oldcount; ++i) {
CFMutableDictionaryRef newdict = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(oldprojs, i);
@@ -123,4 +119,6 @@
// CFDataRef data = CFPropertyListCreateXMLData(NULL, plist);
// fprintf(stdout, "%.*s", CFDataGetLength(data), CFDataGetBytePtr(data));
writePlist(stdout, plist, 0);
+
+ return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20081209/1f72a188/attachment-0001.html>
More information about the darwinbuild-changes
mailing list