mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-07 04:10:27 -08:00
Make sqlite.c build with SQlite in Fedora 9
* src/sqlite.c (sqlite_prepare_errdata): Use sqlite3_errmsg instead of sqlite3_errstr.
This commit is contained in:
parent
656cc127f2
commit
ae7dcba6c5
1 changed files with 16 additions and 4 deletions
20
src/sqlite.c
20
src/sqlite.c
|
|
@ -428,11 +428,23 @@ row_to_value (sqlite3_stmt *stmt)
|
|||
static Lisp_Object
|
||||
sqlite_prepare_errdata (int code, sqlite3 *sdb)
|
||||
{
|
||||
Lisp_Object errstr = build_string (sqlite3_errstr (code));
|
||||
Lisp_Object errcode = make_fixnum (code);
|
||||
Lisp_Object errstr, errcode, ext_errcode;
|
||||
const char *errmsg;
|
||||
|
||||
/* The internet says this is identical to sqlite3_errstr (code),
|
||||
which is too new to exist on Fedora 9. */
|
||||
errmsg = sqlite3_errmsg (sdb);
|
||||
errstr = errmsg ? build_string (errmsg) : Qnil;
|
||||
errcode = make_fixnum (code);
|
||||
|
||||
/* More details about what went wrong. */
|
||||
Lisp_Object ext_errcode = make_fixnum (sqlite3_extended_errcode (sdb));
|
||||
const char *errmsg = sqlite3_errmsg (sdb);
|
||||
#if SQLITE_VERSION_NUMBER >= 3006005
|
||||
ext_errcode = make_fixnum (sqlite3_extended_errcode (sdb));
|
||||
#else
|
||||
/* What value to use here? */
|
||||
ext_errcode = make_fixnum (0);
|
||||
#endif
|
||||
|
||||
return list4 (errstr, errmsg ? build_string (errmsg) : Qnil,
|
||||
errcode, ext_errcode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue