[CVS] RPM: rpm/ CHANGES rpm/rpmio/ rpmsql.c rpmsql.h rpm/tools/ Makefi...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Apr-2010 22:42:46 Branch: HEAD Handle: 2010040420424501 Modified files: rpm CHANGES rpm/rpmio rpmsql.c rpmsql.h rpm/tools Makefile.am dbsql.c Log: - dbsql: use popt for CLI processing. Summary: RevisionChanges Path 1.3300 +1 -0 rpm/CHANGES 2.2 +10 -2 rpm/rpmio/rpmsql.c 2.2 +5 -0 rpm/rpmio/rpmsql.h 2.162 +2 -1 rpm/tools/Makefile.am 2.4 +230 -302 rpm/tools/dbsql.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3299 -r1.3300 CHANGES --- rpm/CHANGES 4 Apr 2010 16:02:07 - 1.3299 +++ rpm/CHANGES 4 Apr 2010 20:42:45 - 1.3300 @@ -1,5 +1,6 @@ 5.2b1 -> 5.3a1 +- jbj: dbsql: use popt for CLI processing. - jbj: swipe sql/sqlite/src/shell.c -> tools/dbsql.c, prep for popt surgery. - jbj: sqlite: stub-in an sqlite3 embedding. - jbj: dbtool: include db_log_verify too. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsql.c $ cvs diff -u -r2.1 -r2.2 rpmsql.c --- rpm/rpmio/rpmsql.c4 Apr 2010 14:35:44 - 2.1 +++ rpm/rpmio/rpmsql.c4 Apr 2010 20:42:45 - 2.2 @@ -27,11 +27,19 @@ rpmsql sql = _sql; SQLDBG((stderr, "==> %s(%p)\n", __FUNCTION__, sql)); +sql->zInitFile = _free(sql->zInitFile); sql->av = argvFree(sql->av); #if defined(WITH_SQLITE) if (sql->I) { - int xx; - xx = sqlite3_close((sqlite3 *)sql->I); + sqlite3 * db = (sqlite3 *)sql->I; + switch (sqlite3_close(db)) { + default: + fprintf(stderr, "Error: cannot close database \"%s\"\n", +sqlite3_errmsg(db)); + break; + case SQLITE_OK: + break; + } } #endif sql->I = NULL; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsql.h $ cvs diff -u -r2.1 -r2.2 rpmsql.h --- rpm/rpmio/rpmsql.h4 Apr 2010 14:35:44 - 2.1 +++ rpm/rpmio/rpmsql.h4 Apr 2010 20:42:45 - 2.2 @@ -35,6 +35,11 @@ const char ** av;/*!< arguments */ void * I; +int stdin_is_interactive; +int bail_on_error; + +const char * zInitFile; + #if defined(__LCLINT__) /*...@refs@*/ int nrefs; /*!< (unused) keep splint happy */ @@ . patch -p0 <<'@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.161 -r2.162 Makefile.am --- rpm/tools/Makefile.am 4 Apr 2010 16:24:41 - 2.161 +++ rpm/tools/Makefile.am 4 Apr 2010 20:42:46 - 2.162 @@ -280,7 +280,8 @@ dbsql_CFLAGS = $(CFLAGS) -I../db3/sql -I../db/sql/generated dbsql_LDFLAGS= @LDFLAGS_STATIC@ $(LDFLAGS) dbsql_LDADD = \ - $(top_builddir)/db3/libdb_sql-5.0.la + $(top_builddir)/db3/libdb_sql-5.0.la \ + $(RPMIO_LDADD_COMMON) endif if WITH_DBSQL_CODEGEN pkgbin_PROGRAMS += db_sql_codegen @@ . patch -p0 <<'@@ .' Index: rpm/tools/dbsql.c $ cvs diff -u -r2.3 -r2.4 dbsql.c --- rpm/tools/dbsql.c 4 Apr 2010 17:08:03 - 2.3 +++ rpm/tools/dbsql.c 4 Apr 2010 20:42:46 - 2.4 @@ -12,10 +12,6 @@ ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. */ -#if defined(_WIN32) || defined(WIN32) -/* This needs to come before any includes for MSVC compiler */ -#define _CRT_SECURE_NO_WARNINGS -#endif /* ** Include the configuration header output by 'configure' if we're using the @@ -149,36 +145,11 @@ #define UNUSED_PARAMETER(x) (void)(x) /* -** If the following flag is set, then command execution stops -** at an error if we are not interactive. -*/ -static int bail_on_error = 0; - -/* -** Threat stdin as an interactive input if the following variable -** is true. Otherwise, assume stdin is connected to a file or pipe. -*/ -static int stdin_is_interactive = 1; - -/* -** The following is the open SQLite database. We make a pointer -** to this database a static variable so that it can be acces
[CVS] RPM: rpm/tools/ Makefile.am dbsql.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Apr-2010 18:24:41 Branch: HEAD Handle: 2010040416244100 Modified files: rpm/tools Makefile.am dbsql.c Log: - dbsql: replace BDB -> RPM AutoFu. Summary: RevisionChanges Path 2.161 +1 -2 rpm/tools/Makefile.am 2.2 +55 -124rpm/tools/dbsql.c patch -p0 <<'@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.160 -r2.161 Makefile.am --- rpm/tools/Makefile.am 4 Apr 2010 16:02:08 - 2.160 +++ rpm/tools/Makefile.am 4 Apr 2010 16:24:41 - 2.161 @@ -277,8 +277,7 @@ if WITH_DBSQL pkgbin_PROGRAMS += dbsql dbsql_SOURCES= dbsql.c -dbsql_CFLAGS = $(CFLAGS) \ - -D_HAVE_SQLITE_CONFIG_H -I../db3/sql -I../db/sql/generated +dbsql_CFLAGS = $(CFLAGS) -I../db3/sql -I../db/sql/generated dbsql_LDFLAGS= @LDFLAGS_STATIC@ $(LDFLAGS) dbsql_LDADD = \ $(top_builddir)/db3/libdb_sql-5.0.la @@ . patch -p0 <<'@@ .' Index: rpm/tools/dbsql.c $ cvs diff -u -r2.1 -r2.2 dbsql.c --- rpm/tools/dbsql.c 4 Apr 2010 16:02:08 - 2.1 +++ rpm/tools/dbsql.c 4 Apr 2010 16:24:41 - 2.2 @@ -21,37 +21,70 @@ ** Include the configuration header output by 'configure' if we're using the ** autoconf-based build */ -#ifdef _HAVE_SQLITE_CONFIG_H -#include "config.h" + +#include "system.h" + +#include + +#define _RPMSQL_INTERNAL +#include + +/* +** Build options detected by SQLite's configure script but not normally part +** of config.h. Accept what configure detected unless it was overridden on the +** command line. +*/ +#ifndef HAVE_EDITLINE +#define HAVE_EDITLINE 0 +#endif +#if !HAVE_EDITLINE +#undef HAVE_EDITLINE #endif -#ifdef ANDROID -#ifndef NO_ANDROID_FUNCS -#include +#ifndef HAVE_READLINE +#define HAVE_READLINE 0 #endif +#if !HAVE_READLINE +#undef HAVE_READLINE #endif -#include -#include -#include -#include -#include "sqlite3.h" -#include -#include +#ifndef SQLITE_OS_UNIX +#define SQLITE_OS_UNIX 1 +#endif +#if !SQLITE_OS_UNIX +#undef SQLITE_OS_UNIX +#endif -#if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__) -# include -# if !defined(__RTP__) && !defined(_WRS_KERNEL) -# include -# endif -# include -# include +#ifndef SQLITE_OS_WIN +#define SQLITE_OS_WIN 0 +#endif +#if !SQLITE_OS_WIN +#undef SQLITE_OS_WIN #endif -#ifdef __OS2__ -# include +#ifndef SQLITE_THREADSAFE +#define SQLITE_THREADSAFE 1 +#endif +#if !SQLITE_THREADSAVE +#undef SQLITE_THREADSAVE +#endif + +#ifndef SQLITE_THREAD_OVERRIDE_LOCK +#define SQLITE_THREAD_OVERRIDE_LOCK -1 +#endif +#if !SQLITE_THREAD_OVERRIDE_LOCK +#undef SQLITE_THREAD_OVERRIDE_LOCK #endif +#ifndef SQLITE_TEMP_STORE +#define SQLITE_TEMP_STORE 1 +#endif +#if !SQLITE_THREAD_OVERRIDE_LOCK +#undef SQLITE_THREAD_OVERRIDE_LOCK +#endif + +#include "sqlite3.h" + #if defined(HAVE_EDITLINE) && HAVE_EDITLINE==1 #include #elif defined(HAVE_READLINE) && HAVE_READLINE==1 @@ -65,27 +98,7 @@ # define stifle_history(X) #endif -#if defined(_WIN32) || defined(WIN32) -# include -#define isatty(h) _isatty(h) -#define access(f,m) _access((f),(m)) -#else -/* Make sure isatty() has a prototype. -*/ -extern int isatty(); -#endif - -#if defined(_WIN32_WCE) -/* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty() - * thus we always assume that we have a console. That can be - * overridden with the -batch command line option. - */ -#define isatty(x) 1 -#endif - -#if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__) && !defined(__RTP__) && !defined(_WRS_KERNEL) -#include -#include +#include "debug.h" /* Saved resource information for the beginning of an operation */ static struct rusage sBegin; @@ -125,87 +138,6 @@ #define END_TIMER endTimer() #define HAS_TIMER 1 -#elif (defined(_WIN32) || defined(WIN32)) - -#include - -/* Saved resource information for the beginning of an operation */ -static HANDLE hProcess; -static FILETIME ftKernelBegin; -static FILETIME ftUserBegin; -typedef BOOL (WINAPI *GETPROCTIMES)(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME, LPFILETIME); -static GETPROCTIMES getProcessTimesAddr = NULL; - -/* True if the timer i
[CVS] RPM: rpm/ CHANGES rpm/rpmio/ Makefile.am librpmio.vers macro.c p...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Apr-2010 16:35:44 Branch: HEAD Handle: 2010040414354301 Added files: rpm/rpmio rpmsql.c rpmsql.h Modified files: rpm CHANGES rpm/rpmio Makefile.am librpmio.vers macro.c poptIO.c rpmio.c rpmnix.h Log: - sqlite: stub-in an sqlite3 embedding. Summary: RevisionChanges Path 1.3298 +3 -0 rpm/CHANGES 1.268 +4 -4 rpm/rpmio/Makefile.am 2.164 +4 -0 rpm/rpmio/librpmio.vers 2.247 +30 -1 rpm/rpmio/macro.c 1.85+3 -0 rpm/rpmio/poptIO.c 1.219 +6 -0 rpm/rpmio/rpmio.c 1.18+1 -1 rpm/rpmio/rpmnix.h 2.1 +107 -0 rpm/rpmio/rpmsql.c 2.1 +128 -0 rpm/rpmio/rpmsql.h patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3297 -r1.3298 CHANGES --- rpm/CHANGES 2 Apr 2010 12:30:07 - 1.3297 +++ rpm/CHANGES 4 Apr 2010 14:35:43 - 1.3298 @@ -1,5 +1,8 @@ 5.2b1 -> 5.3a1 +- jbj: sqlite: stub-in an sqlite3 embedding. +- jbj: dbtool: include db_log_verify too. +- jbj: rpmdb: handle the db_sql -> db_sql_codegen renaming in 5.0.21. - jbj: rpmdb: remove db-3.x.y, add db-5.0.21, changes. - jbj: nix: stub-in rpmnix{Env,Hash,Instantiate,Store,Worker} noop methods. - jbj: nix: refactor xiu-hash/xiu-instantiate/xiu-store popt tables. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.267 -r1.268 Makefile.am --- rpm/rpmio/Makefile.am 27 Mar 2010 20:03:20 - 1.267 +++ rpm/rpmio/Makefile.am 4 Apr 2010 14:35:44 - 1.268 @@ -75,8 +75,8 @@ rpmdav.h rpmdir.h rpmficl.h rpmgc.h \ rpmhash.h rpmhook.h rpmio_internal.h rpmjs.h rpmjsio.h rpmkeyring.h \ rpmku.h rpmlua.h rpmmg.h rpmnix.h rpmnss.h rpmperl.h rpmpython.h \ - rpmruby.h rpmsm.h rpmsp.h rpmsq.h rpmsquirrel.h rpmssl.h rpmsx.h \ - rpmsyck.h rpmtcl.h rpmurl.h rpmuuid.h rpmxar.h rpmz.h rpmzq.h \ + rpmruby.h rpmsm.h rpmsp.h rpmsq.h rpmsql.h rpmsquirrel.h rpmssl.h \ + rpmsx.h rpmsyck.h rpmtcl.h rpmurl.h rpmuuid.h rpmxar.h rpmz.h rpmzq.h \ tar.h ugid.h rpmio-stub.h usrlibdir = $(libdir) @@ -94,8 +94,8 @@ rpmjs.c rpmjsio.c rpmkeyring.c \ rpmku.c rpmlog.c rpmlua.c rpmmalloc.c rpmmg.c rpmnix.c rpmnss.c \ rpmperl.c rpmpgp.c rpmpython.c rpmrpc.c rpmruby.c rpmsm.c rpmsp.c \ - rpmsq.c rpmsquirrel.c rpmssl.c rpmsyck.c rpmsw.c rpmsx.c rpmtcl.c \ - rpmuuid.c rpmxar.c rpmzlog.c rpmzq.c \ + rpmsq.c rpmsql.c rpmsquirrel.c rpmssl.c rpmsyck.c rpmsw.c rpmsx.c \ + rpmtcl.c rpmuuid.c rpmxar.c rpmzlog.c rpmzq.c \ strcasecmp.c strtolocale.c tar.c url.c ugid.c xzdio.c yarn.c librpmio_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION) if HAVE_LD_VERSION_SCRIPT @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/librpmio.vers $ cvs diff -u -r2.163 -r2.164 librpmio.vers --- rpm/rpmio/librpmio.vers 31 Mar 2010 12:36:03 - 2.163 +++ rpm/rpmio/librpmio.vers 4 Apr 2010 14:35:44 - 2.164 @@ -533,6 +533,10 @@ rpmsqThread; rpmsqThreadEqual; rpmsqWait; +_rpmsql_debug; +rpmsqlNew; +rpmsqlRun; +rpmsqlRunFile; _rpmsquirrel_debug; rpmsquirrelNew; rpmsquirrelRun; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/macro.c $ cvs diff -u -r2.246 -r2.247 macro.c --- rpm/rpmio/macro.c 1 Apr 2010 00:54:39 - 2.246 +++ rpm/rpmio/macro.c 4 Apr 2010 14:35:44 - 2.247 @@ -86,6 +86,7 @@ #include #include #include +#include #include #endif @@ -98,7 +99,7 @@ #include "debug.h" /*...@unchecked@*/ -#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_JS) || defined(WITH_NIX) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_SQUIRREL) || defined(WITH_TCL) +#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_JS) || defined(WITH_NIX) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_SQL) || defined(WITH_SQUIRREL) || defined(WITH_TC
[CVS] RPM: lua/shadow/ strtoday.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: lua Date: 04-Apr-2010 10:06:01 Branch: HEAD Handle: 2010040408060100 Modified files: lua/shadow strtoday.c Log: make function match prototype, cast instead Summary: RevisionChanges Path 1.8 +3 -3 lua/shadow/strtoday.c patch -p0 <<'@@ .' Index: lua/shadow/strtoday.c $ cvs diff -u -r1.7 -r1.8 strtoday.c --- lua/shadow/strtoday.c 21 Mar 2010 14:56:59 - 1.7 +++ lua/shadow/strtoday.c 4 Apr 2010 08:06:01 - 1.8 @@ -42,7 +42,7 @@ #include "defines.h" #include "prototypes.h" -#ident "$Id: strtoday.c,v 1.7 2010/03/21 14:56:59 jbj Exp $" +#ident "$Id: strtoday.c,v 1.8 2010/04/04 08:06:01 afb Exp $" #ifndef USE_GETDATE #define USE_GETDATE 1 @@ -1711,7 +1711,7 @@ * 24-sep-72 * 24sep72 */ -long strtoday (char *str) +long strtoday (const char *str) { time_t t; @@ -1723,7 +1723,7 @@ if (!str || *str == '\0') return -1; - t = get_date (str, (struct timeb *) 0); + t = get_date ((char *) str, (struct timeb *) 0); if (t == (time_t) - 1) return -1; /* convert seconds to days since 1970-01-01 */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: lua/chkconfig/ chkconfig.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: lua Date: 04-Apr-2010 09:59:35 Branch: HEAD Handle: 2010040407593500 Modified files: lua/chkconfig chkconfig.c Log: fix casts, to work with C too Summary: RevisionChanges Path 1.6 +3 -3 lua/chkconfig/chkconfig.c patch -p0 <<'@@ .' Index: lua/chkconfig/chkconfig.c $ cvs diff -u -r1.5 -r1.6 chkconfig.c --- lua/chkconfig/chkconfig.c 21 Mar 2010 14:56:58 - 1.5 +++ lua/chkconfig/chkconfig.c 4 Apr 2010 07:59:35 - 1.6 @@ -211,7 +211,7 @@ } if (!S_ISREG(sb.st_mode)) continue; if (!strcmp(ent->d_name, s->name)) continue; - servs = (service *) realloc(servs, (numservs+1) * sizeof(struct service)); + servs = (struct service *) realloc(servs, (numservs+1) * sizeof(struct service)); if (!readServiceInfo(ent->d_name, servs + numservs, 0)) numservs++; } @@ -473,7 +473,7 @@ } numServices = 0; numServicesAlloced = 10; - s = (service *) malloc(sizeof (*s) * numServicesAlloced); + s = (struct service *) malloc(sizeof (*s) * numServicesAlloced); while ((ent = readdir(dir))) { const char *dn; @@ -492,7 +492,7 @@ if (numServices == numServicesAlloced) { numServicesAlloced += 10; - s = (service *) realloc(s, numServicesAlloced * sizeof (*s)); + s = (struct service *) realloc(s, numServicesAlloced * sizeof (*s)); } if (readXinetdServiceInfo(ent->d_name, s + numServices, 0) != -1) numServices ++; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org