cvs: php-src /ext/pgsql config.m4 config.w32 pgsql.c
| From: | Ilia Alshanetsky | Date: | Fri, 15 Sep 2006 19:48:55 +0000 |
| Subject: | cvs: php-src /ext/pgsql config.m4 config.w32 pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40540@lists.php.net to get a copy of this message | ||
iliaa Fri Sep 15 19:48:55 2006 UTC
Modified files:
/php-src/ext/pgsql config.w32 config.m4 pgsql.c
Log:
MFB: Added a check for PQftable() function
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.w32?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/pgsql/config.w32
diff -u php-src/ext/pgsql/config.w32:1.7 php-src/ext/pgsql/config.w32:1.8
--- php-src/ext/pgsql/config.w32:1.7 Sun Jun 5 19:25:01 2005
+++ php-src/ext/pgsql/config.w32 Fri Sep 15 19:48:55 2006
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.7 2005/06/05 19:25:01 wez Exp $
+// $Id: config.w32,v 1.8 2006/09/15 19:48:55 iliaa Exp $
// vim:ft=javascript
ARG_WITH("pgsql", "PostgreSQL support", "no");
@@ -8,7 +8,7 @@
CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PGSQL", PHP_PGSQL +
"\\include;" + PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PGSQL)) {
EXTENSION("pgsql", "pgsql.c");
AC_DEFINE('HAVE_PGSQL', 1, 'Have PostgreSQL library');
- ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D
HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D HAVE_PQESCAPE /D
HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D
HAVE_PQEXECPREPARED /D HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE /D
HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND /D HAVE_PQGETCOPYDATA /D
HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA");
+ ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D
HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D HAVE_PQESCAPE /D
HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D
HAVE_PQEXECPREPARED /D HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE /D
HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND /D HAVE_PQGETCOPYDATA /D
HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA /D HAVE_PQFTABLE");
} else {
WARNING("pgsql not enabled; libraries and headers not found");
}
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.47&r2=1.48&diff_format=u
Index: php-src/ext/pgsql/config.m4
diff -u php-src/ext/pgsql/config.m4:1.47 php-src/ext/pgsql/config.m4:1.48
--- php-src/ext/pgsql/config.m4:1.47 Thu Jan 5 21:53:07 2006
+++ php-src/ext/pgsql/config.m4 Fri Sep 15 19:48:55 2006
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.47 2006/01/05 21:53:07 sniper Exp $
+dnl $Id: config.m4,v 1.48 2006/09/15 19:48:55 iliaa Exp $
dnl
AC_DEFUN([PHP_PGSQL_CHECK_FUNCTIONS],[
@@ -90,6 +90,7 @@
AC_CHECK_LIB(pq, PQputCopyEnd,AC_DEFINE(HAVE_PQPUTCOPYEND,1,[PostgreSQL 7.4 or later]))
AC_CHECK_LIB(pq, PQgetCopyData,AC_DEFINE(HAVE_PQGETCOPYDATA,1,[PostgreSQL 7.4 or later]))
AC_CHECK_LIB(pq, PQsetErrorVerbosity,AC_DEFINE(HAVE_PQSETERRORVERBOSITY,1,[PostgreSQL 7.4 or
later]))
+ AC_CHECK_LIB(pq, PQftable,AC_DEFINE(HAVE_PQFTABLE,1,[PostgreSQL 7.4 or later]))
AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq
is compiled with --enable-multibyte]))
LIBS=$old_LIBS
LDFLAGS=$old_LDFLAGS
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.353&r2=1.354&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.353 php-src/ext/pgsql/pgsql.c:1.354
--- php-src/ext/pgsql/pgsql.c:1.353 Wed Sep 6 12:40:47 2006
+++ php-src/ext/pgsql/pgsql.c Fri Sep 15 19:48:55 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.353 2006/09/06 12:40:47 tony2001 Exp $ */
+/* $Id: pgsql.c,v 1.354 2006/09/15 19:48:55 iliaa Exp $ */
#include <stdlib.h>
@@ -154,7 +154,9 @@
PHP_FE(pg_field_type_oid, NULL)
PHP_FE(pg_field_prtlen, NULL)
PHP_FE(pg_field_is_null,NULL)
+#ifdef HAVE_PQFTABLE
PHP_FE(pg_field_table, NULL)
+#endif
/* async message function */
PHP_FE(pg_get_notify, NULL)
PHP_FE(pg_get_pid, NULL)
@@ -1698,6 +1700,7 @@
}
/* }}} */
+#ifdef HAVE_PQFTABLE
/* {{{ proto mixed pg_field_table(resource result, int field_number[, bool oid_only])
Returns the name of the table field belongs to, or table's oid if oid_only is true */
PHP_FUNCTION(pg_field_table)
@@ -1785,7 +1788,8 @@
}
}
-/* }}} */
+/* }}} */
+#endif
#define PHP_PG_FIELD_NAME 1
#define PHP_PG_FIELD_SIZE 2