Date: Mon, 11 Jan 2010 10:41:52 +0000 (UTC) From: Craig Rodrigues <rodrigc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r202077 - projects/jbuild/usr.bin/jdirdep Message-ID: <201001111041.o0BAfqYk036270@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rodrigc Date: Mon Jan 11 10:41:51 2010 New Revision: 202077 URL: http://svn.freebsd.org/changeset/base/202077 Log: Add stub versions of database functions, in case we do not want to compile jbuild with MySQL or SQLite support. Added: projects/jbuild/usr.bin/jdirdep/jdirdep_db_stub.c Modified: projects/jbuild/usr.bin/jdirdep/Makefile.common Modified: projects/jbuild/usr.bin/jdirdep/Makefile.common ============================================================================== --- projects/jbuild/usr.bin/jdirdep/Makefile.common Mon Jan 11 10:40:15 2010 (r202076) +++ projects/jbuild/usr.bin/jdirdep/Makefile.common Mon Jan 11 10:41:51 2010 (r202077) @@ -9,11 +9,13 @@ CFLAGS += -DUSE_SQLITE3 -pthread CFLAGS += -I/usr/local/include SRCS += jdirdep_sqlite3.c LDADD += /usr/local/lib/libsqlite3.a -.else +.elif defined(USE_MYSQL) SRCS += jdirdep_mysql.c MYSQL_CFLAGS != mysql_config --cflags MYSQL_LIBS != mysql_config --libs CFLAGS += -DUSE_MYSQL ${MYSQL_CFLAGS} LDADD += ${MYSQL_LIBS} LDADD += -static +.else +SRCS += jdirdep_db_stub.c .endif Added: projects/jbuild/usr.bin/jdirdep/jdirdep_db_stub.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/jbuild/usr.bin/jdirdep/jdirdep_db_stub.c Mon Jan 11 10:41:51 2010 (r202077) @@ -0,0 +1,32 @@ +/* $FreeBSD$ */ + +#include <sys/types.h> +#include <stdlib.h> +#include "jdirdep.h" + +void +jdirdep_db_close(void) +{ +} + +void * +jdirdep_db_command_res(const char *fmt __unused, ...) +{ + return (NULL); +} + +void +jdirdep_db_command(db_cb_func func __unused, void *vp __unused, const char *fmt __unused, ...) +{ +} + +void +jdirdep_db_open(const char *name __unused) +{ +} + +int64_t +jdirdep_db_rowid(void) +{ + return (0); +}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001111041.o0BAfqYk036270>