Index: DBD-SQLite-1.12/Makefile.PL --- DBD-SQLite-1.12/Makefile.PL.orig 2005-06-20 14:45:11 +0200 +++ DBD-SQLite-1.12/Makefile.PL 2005-06-21 21:02:43 +0200 @@ -7,34 +7,6 @@ use ExtUtils::MakeMaker; use Config; use strict; -eval { - require DBD::SQLite; - if ($DBD::SQLite::VERSION < 1.0) { - print < 'lib/DBD/SQLite.pm', # finds $VERSION 'PREREQ_PM' => {DBI => 1.21}, # e.g., Module::Name => 1.1 'OBJECT' => ($force_local) ? '$(O_FILES)' : 'SQLite.o dbdimp.o', - 'INC' => '-I. -I$(DBI_INSTARCH_DIR)' . + 'INC' => '-I@l_prefix@/include -I$(DBI_INSTARCH_DIR)' . (($sqlite_inc) ? " -I$sqlite_inc" : ''), + 'LIBS' => ['-L@l_prefix@/lib -lsqlite3'], $force_local ? () : ('LIBS' => '-lsqlite3'), $sqlite_lib ? ('dynamic_lib' => { OTHERLDFLAGS => "-L$sqlite_lib" }) : (), 'OPTIMIZE' => "-O2", Index: DBD-SQLite-1.12/dbdimp.h --- DBD-SQLite-1.12/dbdimp.h.orig 2004-09-10 17:24:28 +0200 +++ DBD-SQLite-1.12/dbdimp.h 2005-06-21 21:01:54 +0200 @@ -4,7 +4,7 @@ #define _DBDIMP_H 1 #include "SQLiteXS.h" -#include "sqliteInt.h" +#include "sqlite3.h" /* 30 second timeout by default */ #define SQL_TIMEOUT 30000 Index: DBD-SQLite-1.12/dbdimp.c --- DBD-SQLite-1.12/dbdimp.c.orig 2006-04-10 03:50:05 +0200 +++ DBD-SQLite-1.12/dbdimp.c 2006-07-24 13:01:30 +0200 @@ -390,14 +390,17 @@ sqlite_trace(3, "Execute returned %d cols\n", DBIc_NUM_FIELDS(imp_sth)); if (DBIc_NUM_FIELDS(imp_sth) == 0) { + char *defererr = strdup((char*)sqlite3_errmsg(imp_dbh->db)); while ((retval = sqlite3_step(imp_sth->stmt)) != SQLITE_DONE) { if (retval == SQLITE_ROW) { continue; } sqlite3_finalize(imp_sth->stmt); - sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, (char*)sqlite3_errmsg(imp_dbh->db)); + sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, defererr); + free(defererr); return -5; } + free(defererr); /* warn("Finalize\n"); */ sqlite3_finalize(imp_sth->stmt); imp_sth->nrow = sqlite3_changes(imp_dbh->db);