sas Mon Feb 19 08:31:17 2001 EDT
Modified files:
/php4/ext/pgsql config.m4 pgsql.c php_pgsql.h
Log:
Simpler fix for the InvalidOid thing by Tom Lane.
He assured me that InvalidOid has always expanded to (Oid) 0, so this
should be safe.
Index: php4/ext/pgsql/config.m4
diff -u php4/ext/pgsql/config.m4:1.19 php4/ext/pgsql/config.m4:1.20
--- php4/ext/pgsql/config.m4:1.19 Mon Feb 19 00:14:45 2001
+++ php4/ext/pgsql/config.m4 Mon Feb 19 08:31:17 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.19 2001/02/19 08:14:45 sas Exp $
+dnl $Id: config.m4,v 1.20 2001/02/19 16:31:17 sas Exp $
AC_DEFUN(PGSQL_INC_CHK,[if test -r $i$1/libpq-fe.h; then PGSQL_DIR=$i;
PGSQL_INCDIR=$i$1])
@@ -22,26 +22,6 @@
fi
PGSQL_INCLUDE="-I$PGSQL_INCDIR"
-
- AC_CACHE_CHECK([whether PostgreSQL needs postgres.h], ac_cv_php_pgsql_postgres_h,[
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $PGSQL_INCLUDE"
- AC_TRY_COMPILE([
-#include <libpq-fe.h>
-],[
- Oid x = InvalidOid;
-],[
- ac_cv_php_pgsql_postgres_h=no
-],[
- ac_cv_php_pgsql_postgres_h=yes
-])
- CPPFLAGS=$old_CPPFLAGS
-])
-
- if test "$ac_cv_php_pgsql_postgres_h" = "yes"; then
- AC_DEFINE(PHP_PGSQL_NEEDS_POSTGRES_H, 1, [whether pgsql needs postgres.h])
- fi
-
PGSQL_LIBDIR=$PGSQL_DIR/lib
test -d $PGSQL_DIR/lib/pgsql && PGSQL_LIBDIR=$PGSQL_DIR/lib/pgsql
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.90 php4/ext/pgsql/pgsql.c:1.91
--- php4/ext/pgsql/pgsql.c:1.90 Sun Feb 18 23:50:06 2001
+++ php4/ext/pgsql/pgsql.c Mon Feb 19 08:31:17 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.90 2001/02/19 07:50:06 sas Exp $ */
+/* $Id: pgsql.c,v 1.91 2001/02/19 16:31:17 sas Exp $ */
#include <stdlib.h>
@@ -31,6 +31,9 @@
#if HAVE_PGSQL
+#ifndef InvalidOid
+#define InvalidOid ((Oid) 0)
+#endif
#define PGSQL_ASSOC 1<<0
#define PGSQL_NUM 1<<1
Index: php4/ext/pgsql/php_pgsql.h
diff -u php4/ext/pgsql/php_pgsql.h:1.26 php4/ext/pgsql/php_pgsql.h:1.27
--- php4/ext/pgsql/php_pgsql.h:1.26 Mon Feb 19 00:14:45 2001
+++ php4/ext/pgsql/php_pgsql.h Mon Feb 19 08:31:17 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pgsql.h,v 1.26 2001/02/19 08:14:45 sas Exp $ */
+/* $Id: php_pgsql.h,v 1.27 2001/02/19 16:31:17 sas Exp $ */
#ifndef PHP_PGSQL_H
#define PHP_PGSQL_H
@@ -29,9 +29,6 @@
#ifdef PHP_PGSQL_PRIVATE
#undef SOCKET_SIZE_TYPE
-#ifdef PHP_PGSQL_NEEDS_POSTGRES_H
-#include <postgres.h>
-#endif
#include <libpq-fe.h>
#ifdef PHP_WIN32
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]