diff options
author | Sascha Schumann <sas@php.net> | 2001-02-19 16:31:17 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2001-02-19 16:31:17 +0000 |
commit | 0eec8cf2f729e01ee26afa786bf272ac1bbc7bdb (patch) | |
tree | 4281c751d254723a147df8d706b8f1a95c44fbce /ext/pgsql | |
parent | 2403578e35d29ab63f7ff5b0f28cbeffd02d75cc (diff) | |
download | php-git-0eec8cf2f729e01ee26afa786bf272ac1bbc7bdb.tar.gz |
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.
Diffstat (limited to 'ext/pgsql')
-rw-r--r-- | ext/pgsql/config.m4 | 20 | ||||
-rw-r--r-- | ext/pgsql/pgsql.c | 3 | ||||
-rw-r--r-- | 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 <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 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 <postgres.h> -#endif #include <libpq-fe.h> #ifdef PHP_WIN32 |