]> granicus.if.org Git - php/commitdiff
MFB: more verbose phpinfo() output
authorEdin Kadribasic <edink@php.net>
Tue, 14 Mar 2006 11:04:13 +0000 (11:04 +0000)
committerEdin Kadribasic <edink@php.net>
Tue, 14 Mar 2006 11:04:13 +0000 (11:04 +0000)
ext/pdo_pgsql/config.w32
ext/pdo_pgsql/pdo_pgsql.c

index 6af9c98072a677002c62c493b3ed10b4ff5d53d0..3c74c9bf004aafc2625286ff498e38483d1a97e7 100644 (file)
@@ -7,6 +7,11 @@ if (PHP_PDO_PGSQL != "no") {
        if (CHECK_LIB("libpq.lib", "pdo_pgsql", PHP_PDO_PGSQL) &&
                        CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
                EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c");
+
+               if (CHECK_HEADER_ADD_INCLUDE("pg_config.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
+                       ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PG_CONFIG_H");
+               }
+
                ADD_FLAG('CFLAGS_PDO_PGSQL', "/I ..\\pecl");
                AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
                ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PQPARAMETERSTATUS=1 /D HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1");
index 1c51bb4e1a81c87ff587c24a9de49bc115104299..62b5ec6543889b36988e00cb8a78c04b91444828 100644 (file)
 #include "php_pdo_pgsql.h"
 #include "php_pdo_pgsql_int.h"
 
+#ifdef HAVE_PG_CONFIG_H
+#include <pg_config.h>
+#endif
+
 /* {{{ pdo_pgsql_functions[] */
 zend_function_entry pdo_pgsql_functions[] = {
        {NULL, NULL, NULL}
@@ -115,6 +119,12 @@ PHP_MINFO_FUNCTION(pdo_pgsql)
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "PDO Driver for PostgreSQL", "enabled");
+#ifdef HAVE_PG_CONFIG_H        
+       php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
+#endif 
+       php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version);
+       php_info_print_table_row(2, "Revision", " $Id$ ");
+
        php_info_print_table_end();
 }
 /* }}} */