cvs: php4 /ext/pgsql config.m4 pgsql.c php_pgsql.h

From: Date: Sun, 31 Mar 2002 01:18:32 +0000
Subject: cvs: php4 /ext/pgsql config.m4 pgsql.c php_pgsql.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10793@lists.php.net to get a copy of this message
yohgaki Sat Mar 30 20:18:32 2002 EDT Modified files: /php4/ext/pgsql config.m4 pgsql.c php_pgsql.h Log: Print PostgreSQL version number in phpinfo() Index: php4/ext/pgsql/config.m4 diff -u php4/ext/pgsql/config.m4:1.29 php4/ext/pgsql/config.m4:1.30 --- php4/ext/pgsql/config.m4:1.29 Fri Mar 29 06:24:54 2002 +++ php4/ext/pgsql/config.m4 Sat Mar 30 20:18:32 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29 2002/03/29 11:24:54 yohgaki Exp $ +dnl $Id: config.m4,v 1.30 2002/03/31 01:18:32 yohgaki Exp $ dnl AC_DEFUN(PHP_PGSQL_CHECK_FUNCTIONS,[ @@ -23,6 +23,9 @@ if test -r "$i/$j/libpq-fe.h"; then PGSQL_INC_BASE=$i PGSQL_INCLUDE=$i/$j + if test -r "$i/$j/pg_config.h"; then + AC_DEFINE(HAVE_PG_CONFIG_H,1,[Whether to have pg_config.h]) + fi fi done Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.164 php4/ext/pgsql/pgsql.c:1.165 --- php4/ext/pgsql/pgsql.c:1.164 Fri Mar 29 06:24:54 2002 +++ php4/ext/pgsql/pgsql.c Sat Mar 30 20:18:32 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.164 2002/03/29 11:24:54 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.165 2002/03/31 01:18:32 yohgaki Exp $ */ #include <stdlib.h> @@ -399,6 +399,9 @@ php_info_print_table_start(); php_info_print_table_header(2, "PostgreSQL Support", "enabled"); +#ifdef HAVE_PG_CONFIG_H + php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION); +#endif sprintf(buf, "%ld", PGG(num_persistent)); php_info_print_table_row(2, "Active Persistent Links", buf); sprintf(buf, "%ld", PGG(num_links)); Index: php4/ext/pgsql/php_pgsql.h diff -u php4/ext/pgsql/php_pgsql.h:1.39 php4/ext/pgsql/php_pgsql.h:1.40 --- php4/ext/pgsql/php_pgsql.h:1.39 Wed Feb 6 02:25:51 2002 +++ php4/ext/pgsql/php_pgsql.h Sat Mar 30 20:18:32 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pgsql.h,v 1.39 2002/02/06 07:25:51 yohgaki Exp $ */ +/* $Id: php_pgsql.h,v 1.40 2002/03/31 01:18:32 yohgaki Exp $ */ #ifndef PHP_PGSQL_H #define PHP_PGSQL_H @@ -36,6 +36,10 @@ #define INV_READ 0x00040000 #else #include <libpq/libpq-fs.h> +#endif + +#ifdef HAVE_PG_CONFIG_H +#include <pg_config.h> #endif #ifdef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT

« previous php.cvs (#10793) next »