]> granicus.if.org Git - php/commitdiff
- Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4)
authorFelipe Pena <felipe@php.net>
Wed, 21 Apr 2010 01:18:19 +0000 (01:18 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 21 Apr 2010 01:18:19 +0000 (01:18 +0000)
# Just in this branch, as config.m4 in the 5_3 branch states that 7.4+ is required

NEWS
ext/pdo_pgsql/config.m4
ext/pdo_pgsql/php_pdo_pgsql_int.h

diff --git a/NEWS b/NEWS
index fb21796df7f2e6790e6f1de477d8ca74f488797e..e6854c8d8a84d9758513c301d2aaaeba0c8984e2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP                                                                        NEWS
 - Fixed a NULL pointer dereference when processing invalid XML-RPC
   requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
 
+- Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4).
+  (Felipe, wdierkes at 5dollarwhitebox dot org)
 - Fixed bug #51615 (PHP crash with wrong HTML in SimpleXML). (Felipe)
 - Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter).
   (Felipe)
index 3abaf1306a2e5d4090935d4d7da55a1191d95076..701fa1125c8c8e8a34c93d9676c4c4137f444555 100644 (file)
@@ -92,6 +92,7 @@ if test "$PHP_PDO_PGSQL" != "no"; then
   AC_CHECK_LIB(pq, PQtransactionStatus,AC_DEFINE(HAVE_PGTRANSACTIONSTATUS,1,[PostgreSQL 7.4 or later]))
   AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.4 or later]))
   AC_CHECK_LIB(pq, PQExecParams,AC_DEFINE(HAVE_PQEXECPARAMS,1,[PostgreSQL 7.4 or later]))
+  AC_CHECK_LIB(pq, PQfreemem, AC_DEFINE(HAVE_PQFREEMEM,1,[PostgreSQL 7.4 or later]))
   AC_CHECK_LIB(pq, PQresultErrorField,AC_DEFINE(HAVE_PQRESULTERRORFIELD,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]))
   
index a2787f8fda6aa17e706ff93fc2cdb967504a2103..8d12c96a9848b85bfde727f1e0d017789e93ab94 100644 (file)
 #include <libpq/libpq-fs.h>
 #include <php.h>
 
+#ifndef HAVE_PQFREEMEM
+#define PQfreemem free
+#endif
+
 #define PHP_PDO_PGSQL_CONNECTION_FAILURE_SQLSTATE "08006"
 
 typedef struct {