helly Tue Jul 1 13:55:32 2003 EDT Modified files: /php-src/ext/sqlite sqlite.c sess_sqlite.c Log: Fix warnings and allow builds without ext/session Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.68 php-src/ext/sqlite/sqlite.c:1.69 --- php-src/ext/sqlite/sqlite.c:1.68 Tue Jul 1 09:26:49 2003 +++ php-src/ext/sqlite/sqlite.c Tue Jul 1 13:55:32 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.68 2003/07/01 13:26:49 wez Exp $ + $Id: sqlite.c,v 1.69 2003/07/01 17:55:32 helly Exp $ */ #ifdef HAVE_CONFIG_H @@ -58,8 +58,10 @@ ZEND_DECLARE_MODULE_GLOBALS(sqlite) +#if HAVE_PHP_SESSION extern ps_module ps_mod_sqlite; #define ps_sqlite_ptr &ps_mod_sqlite +#endif extern int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out); extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out); @@ -882,7 +884,9 @@ REGISTER_INI_ENTRIES(); +#if HAVE_PHP_SESSION php_session_register_module(ps_sqlite_ptr); +#endif le_sqlite_db = zend_register_list_destructors_ex(php_sqlite_db_dtor, NULL, "sqlite database", module_number); le_sqlite_pdb = zend_register_list_destructors_ex(NULL, php_sqlite_db_dtor, "sqlite database (persistent)", module_number); @@ -944,7 +948,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.68 2003/07/01 13:26:49 wez Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.69 2003/07/01 17:55:32 helly Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); Index: php-src/ext/sqlite/sess_sqlite.c diff -u php-src/ext/sqlite/sess_sqlite.c:1.2 php-src/ext/sqlite/sess_sqlite.c:1.3 --- php-src/ext/sqlite/sess_sqlite.c:1.2 Tue Jul 1 09:09:57 2003 +++ php-src/ext/sqlite/sess_sqlite.c Tue Jul 1 13:55:32 2003 @@ -17,9 +17,12 @@ +----------------------------------------------------------------------+ */ -/* $Id: sess_sqlite.c,v 1.2 2003/07/01 13:09:57 wez Exp $ */ +/* $Id: sess_sqlite.c,v 1.3 2003/07/01 17:55:32 helly Exp $ */ #include "php.h" + +#if HAVE_PHP_SESSION + #include "ext/session/php_session.h" #include <sqlite.h> @@ -71,9 +74,7 @@ PS_OPEN_FUNC(sqlite) { - char *filepath; char *errmsg = NULL; - int spath_len, sname_len, fp_len; sqlite *db; /* TODO: do we need a safe_mode check here? */ @@ -202,6 +203,8 @@ return SQLITE_OK == sqlite_exec_printf(db, GC_QUERY, NULL, NULL, NULL, t, maxlifetime) ? SUCCESS : FAILURE; } + +#endif /* HAVE_PHP_SESSION */ /* * Local variables:
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php