From dad016bcee4340d19f604e51b12d97266dbacefd Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 31 Jan 2013 22:15:54 +0100 Subject: [PATCH] build maintenance --- TODO | 1 - config.m4 | 5 ++-- package.xml | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/php_pq.c | 15 +++++++++- src/php_pq.h | 2 +- 5 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 package.xml diff --git a/TODO b/TODO index 5cf7547..4d29ac5 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,5 @@ * bound columns/variables * fetchInto/fetchCtor? * unlisten? -* pq\Result->__clone through PQcopyResult? * LOB stream wrapper * LOB convenience import/export over php streams diff --git a/config.m4 b/config.m4 index bbd3e01..7abff92 100644 --- a/config.m4 +++ b/config.m4 @@ -23,7 +23,6 @@ if test "$PHP_PQ" != "no"; then PQ_SYM=PQregisterEventProc PHP_CHECK_LIBRARY(pq, $PQ_SYM, [ - LDFLAGS="$save_LDFLAGS" PHP_ADD_LIBRARY_WITH_PATH(pq, $PQ_DIR/$PHP_LIBDIR, PQ_SHARED_LIBADD) PHP_SUBST(PQ_SHARED_LIBADD) ],[ @@ -31,8 +30,10 @@ if test "$PHP_PQ" != "no"; then ],[ -L$PQ_DIR/$PHP_LIBDIR ]) + PHP_CHECK_LIBRARY(pq, PQlibVersion, AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion)) PQ_SRC="src/php_pq.c" - PHP_ADD_BUILD_DIR($ext_builddir/src, 1) PHP_NEW_EXTENSION(pq, $PQ_SRC, $ext_shared) + PHP_ADD_BUILD_DIR($ext_builddir/src, 1) fi + diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..cef28b4 --- /dev/null +++ b/package.xml @@ -0,0 +1,83 @@ + + + pq + pecl.php.net + libpq binding + Binding for libpq (PostgreSQL client library) + + Michael Wallner + mike + mike@php.net + yes + + 2013-01-31 + + 1.0.0dev + 1.0.0 + + + beta + beta + + BSD, revised + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.4 + + + 1.4.0 + + + + pq + + + + + diff --git a/src/php_pq.c b/src/php_pq.c index 86eff74..34c4ffe 100644 --- a/src/php_pq.c +++ b/src/php_pq.c @@ -4690,8 +4690,21 @@ static PHP_MSHUTDOWN_FUNCTION(pq) */ static PHP_MINFO_FUNCTION(pq) { + int libpq_v; + char libpq_version[10] = "pre-9.1"; + php_info_print_table_start(); - php_info_print_table_header(2, "pq support", "enabled"); + php_info_print_table_header(2, "PQ Support", "enabled"); + php_info_print_table_row(2, "Extension Version", PHP_PQ_EXT_VERSION); + php_info_print_table_end(); + + php_info_print_table_start(); + php_info_print_table_header(2, "Used Library", "Version"); +#ifdef HAVE_PQLIBVERSION + libpq_v = PQlibVersion(); + slprintf(libpq_version, sizeof(libpq_version), "%d.%d.%d", libpq_v/10000%100, libpq_v/100%100, libpq_v%100); +#endif + php_info_print_table_row(2, "libpq", libpq_version); php_info_print_table_end(); /* Remove comments if you have entries in php.ini diff --git a/src/php_pq.h b/src/php_pq.h index 702d099..fc67bf0 100644 --- a/src/php_pq.h +++ b/src/php_pq.h @@ -14,7 +14,7 @@ #ifndef PHP_PQ_H #define PHP_PQ_H -#define PHP_PQ_EXT_VERSION "0.1.0" +#define PHP_PQ_EXT_VERSION "1.0.0dev" int pq_module_number; zend_module_entry pq_module_entry; -- 2.30.2