mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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.
This commit is contained in:
parent
2403578e35
commit
0eec8cf2f7
3 changed files with 3 additions and 23 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
|
||||
#if HAVE_PGSQL
|
||||
|
||||
#ifndef InvalidOid
|
||||
#define InvalidOid ((Oid) 0)
|
||||
#endif
|
||||
|
||||
#define PGSQL_ASSOC 1<<0
|
||||
#define PGSQL_NUM 1<<1
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue