diff options
author | Werner Koch <[email protected]> | 2016-05-21 18:06:59 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-05-21 18:06:59 +0000 |
commit | b1ba460d8f3358342c2ee2927114d36e767a439f (patch) | |
tree | 6f6e61e8b8ac5dcff7b1f3bb8dbc4feae8fe21d8 /g10/sqlite.c | |
parent | gpg: Explicitly close a combined Tofu DB. (diff) | |
download | gnupg-b1ba460d8f3358342c2ee2927114d36e767a439f.tar.gz gnupg-b1ba460d8f3358342c2ee2927114d36e767a439f.zip |
gpg: Avoid name spaces clash with future sqlite versions.
* g10/sqlite.c: Rename to gpgsql.c. Change function prefixes to
gpgsql_.
* g10/sqlite.h: Rename to gpgsql.h.
* g10/tofu.c: Adjust for changes.
--
We used for our own extensions symbols with an sqlite_ names prefix.
This may in theory lead to duplicated symbols but more important, it
is harder to understand what is from gpg and what is from libsqlite.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/gpgsql.c (renamed from g10/sqlite.c) | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/g10/sqlite.c b/g10/gpgsql.c index 90490c297..72f51b5b7 100644 --- a/g10/sqlite.c +++ b/g10/gpgsql.c @@ -1,4 +1,4 @@ -/* sqlite.c - SQLite helper functions. +/* gpgsql.c - SQLite helper functions. * Copyright (C) 2015 g10 Code GmbH * * This file is part of GnuPG. @@ -26,15 +26,15 @@ #include "util.h" #include "logging.h" -#include "sqlite.h" +#include "gpgsql.h" /* This is a convenience function that combines sqlite3_mprintf and sqlite3_exec. */ int -sqlite3_exec_printf (sqlite3 *db, - int (*callback)(void*,int,char**,char**), void *cookie, - char **errmsg, - const char *sql, ...) +gpgsql_exec_printf (sqlite3 *db, + int (*callback)(void*,int,char**,char**), void *cookie, + char **errmsg, + const char *sql, ...) { va_list ap; int rc; @@ -56,12 +56,12 @@ sqlite3_exec_printf (sqlite3 *db, } int -sqlite3_stepx (sqlite3 *db, - sqlite3_stmt **stmtp, - sqlite3_stepx_callback callback, - void *cookie, - char **errmsg, - const char *sql, ...) +gpgsql_stepx (sqlite3 *db, + sqlite3_stmt **stmtp, + gpgsql_stepx_callback callback, + void *cookie, + char **errmsg, + const char *sql, ...) { int rc; int err = 0; @@ -69,7 +69,7 @@ sqlite3_stepx (sqlite3 *db, va_list va; int args; - enum sqlite_arg_type t; + enum gpgsql_arg_type t; int i; int cols; @@ -128,7 +128,7 @@ sqlite3_stepx (sqlite3 *db, { for (i = 1; i <= args; i ++) { - t = va_arg (va, enum sqlite_arg_type); + t = va_arg (va, enum gpgsql_arg_type); switch (t) { case SQLITE_ARG_INT: @@ -169,7 +169,7 @@ sqlite3_stepx (sqlite3 *db, } } - t = va_arg (va, enum sqlite_arg_type); + t = va_arg (va, enum gpgsql_arg_type); log_assert (t == SQLITE_ARG_END); va_end (va); |