]> git.pld-linux.org Git - packages/php.git/blob - php-sqlite3-loadext.patch
- sqlite maybe be compiled without extension loading support
[packages/php.git] / php-sqlite3-loadext.patch
1 --- php5.3-200903141330/ext/sqlite3/config0.m4~ 2009-01-13 05:41:28.000000000 +0200
2 +++ php5.3-200903141330/ext/sqlite3/config0.m4  2009-03-16 19:13:43.350625710 +0200
3 @@ -51,6 +51,10 @@
4        AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto support])
5      ])
6  
7 +    PHP_CHECK_LIBRARY(sqlite3,sqlite3_enable_load_extension,[
8 +      AC_DEFINE(HAVE_SQLITE3_LOAD_EXTENSION, 1, [have sqlite3 built with --enable-load-extension])
9 +    ])
10 +
11    else
12      AC_MSG_CHECKING([bundled sqlite3 library])
13      AC_MSG_RESULT([yes])
14 --- php5.3-200903141330/ext/sqlite3/sqlite3.c   2009-03-16 19:17:13.464135377 +0200
15 +++ php5.3-200903141330/ext/sqlite3/sqlite3.c   2009-03-16 21:04:41.540170714 +0200
16 @@ -283,6 +283,11 @@
17                 return;
18         }
19  
20 +#ifdef HAVE_SQLITE3_LOAD_EXTENSION
21 +       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Your version of SQLite doesn't support loading extensions");
22 +       RETURN_FALSE;
23 +#else
24 +
25         if (!SQLITE3G(extension_dir)) {
26                 php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLite Extension are disabled");
27                 RETURN_FALSE;
28 @@ -326,6 +331,7 @@
29         sqlite3_enable_load_extension(db_obj->db, 0);
30  
31         RETURN_TRUE;
32 +#endif
33  }
34  /* }}} */
35  
This page took 0.059195 seconds and 4 git commands to generate.