From 0eec8cf2f729e01ee26afa786bf272ac1bbc7bdb Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Mon, 19 Feb 2001 16:31:17 +0000 Subject: [PATCH] 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. --- ext/pgsql/config.m4 | 20 -------------------- ext/pgsql/pgsql.c | 3 +++ ext/pgsql/php_pgsql.h | 3 --- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4 index fee81e8e0f..3c7c4d19e0 100644 --- a/ext/pgsql/config.m4 +++ b/ext/pgsql/config.m4 @@ -22,26 +22,6 @@ if test "$PHP_PGSQL" != "no"; then 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 -],[ - 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 diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 25b3a36619..abfd1d552c 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -31,6 +31,9 @@ #if HAVE_PGSQL +#ifndef InvalidOid +#define InvalidOid ((Oid) 0) +#endif #define PGSQL_ASSOC 1<<0 #define PGSQL_NUM 1<<1 diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 22ccfe2c75..25f9b7d9de 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -29,9 +29,6 @@ extern zend_module_entry pgsql_module_entry; #ifdef PHP_PGSQL_PRIVATE #undef SOCKET_SIZE_TYPE -#ifdef PHP_PGSQL_NEEDS_POSTGRES_H -#include -#endif #include #ifdef PHP_WIN32 -- 2.50.1