cvs: pecl /pdo_sqlite config.w32 sqlite_driver.c
| From: | Wez Furlong | Date: | Sun, 19 Sep 2004 15:47:13 +0000 |
| Subject: | cvs: pecl /pdo_sqlite config.w32 sqlite_driver.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1850@lists.php.net to get a copy of this message | ||
wez Sun Sep 19 11:47:13 2004 EDT
Modified files:
/pecl/pdo_sqlite config.w32 sqlite_driver.c
Log:
make it build on win32
http://cvs.php.net/diff.php/pecl/pdo_sqlite/config.w32?r1=1.1&r2=1.2&ty=u
Index: pecl/pdo_sqlite/config.w32
diff -u pecl/pdo_sqlite/config.w32:1.1 pecl/pdo_sqlite/config.w32:1.2
--- pecl/pdo_sqlite/config.w32:1.1 Sun Sep 19 06:55:41 2004
+++ pecl/pdo_sqlite/config.w32 Sun Sep 19 11:47:13 2004
@@ -1,12 +1,13 @@
-// $Id: config.w32,v 1.1 2004/09/19 10:55:41 wez Exp $
+// $Id: config.w32,v 1.2 2004/09/19 15:47:13 wez Exp $
// vim:ft=javascript
-ARG_WITH("pdo_sqlite", "for pdo_sqlite support", "no");
+ARG_WITH("pdo-sqlite", "for pdo_sqlite support", "no");
if (PHP_PDO_SQLITE != "no") {
- if (CHECK_LIB("libsqlite3.lib", "pdo_sqlite", PHP_PDO_SQLITE) &&
+ if (CHECK_LIB("sqlite3.lib", "pdo_sqlite", PHP_PDO_SQLITE) &&
CHECK_HEADER_ADD_INCLUDE("sqlite3.h", "CFLAGS_PDO_SQLITE", PHP_PDO_SQLITE))
{
- EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c",
"/I ..\\pecl");
+ EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c");
+ ADD_FLAG('CFLAGS_PDO_SQLITE', "/I ..\\pecl");
} else {
WARNING("pdo_sqlite not enabled; libraries and headers not found");
}
http://cvs.php.net/diff.php/pecl/pdo_sqlite/sqlite_driver.c?r1=1.2&r2=1.3&ty=u
Index: pecl/pdo_sqlite/sqlite_driver.c
diff -u pecl/pdo_sqlite/sqlite_driver.c:1.2 pecl/pdo_sqlite/sqlite_driver.c:1.3
--- pecl/pdo_sqlite/sqlite_driver.c:1.2 Sun Sep 19 08:42:39 2004
+++ pecl/pdo_sqlite/sqlite_driver.c Sun Sep 19 11:47:13 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sqlite_driver.c,v 1.2 2004/09/19 12:42:39 wez Exp $ */
+/* $Id: sqlite_driver.c,v 1.3 2004/09/19 15:47:13 wez Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -265,21 +265,25 @@
{
char *filename;
switch (access_type) {
- case SQLITE_COPY:
- filename = make_filename_safe(arg4);
+ case SQLITE_COPY: {
+ TSRMLS_FETCH();
+ filename = make_filename_safe(arg4 TSRMLS_CC);
if (!filename) {
return SQLITE_DENY;
}
efree(filename);
return SQLITE_OK;
+ }
- case SQLITE_ATTACH:
- filename = make_filename_safe(arg3);
+ case SQLITE_ATTACH: {
+ TSRMLS_FETCH();
+ filename = make_filename_safe(arg3 TSRMLS_CC);
if (!filename) {
return SQLITE_DENY;
}
efree(filename);
return SQLITE_OK;
+ }
default:
/* access allowed */
@@ -300,7 +304,7 @@
H->einfo.errmsg = NULL;
dbh->driver_data = H;
- filename = make_filename_safe(dbh->data_source);
+ filename = make_filename_safe(dbh->data_source TSRMLS_CC);
if (!filename) {
zend_throw_exception_ex(php_pdo_get_exception(), PDO_ERR_CANT_MAP TSRMLS_CC,