1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-11-26 11:54:50 +01:00

check for new connection status constants in pg-10+

This commit is contained in:
Michael Wallner 2020-09-24 16:10:21 +02:00
parent 7faa9186d9
commit a8489a01a4
No known key found for this signature in database
GPG Key ID: 480E3E14B0A4C7C7
2 changed files with 12 additions and 0 deletions

View File

@ -68,6 +68,9 @@ if test "$PHP_PQ" != "no"; then
PQ_CHECK_CONST(PGRES_SINGLE_TUPLE)
PQ_CHECK_CONST(PGRES_COPY_BOTH)
PQ_CHECK_CONST(CONNECTION_CHECK_WRITABLE)
PQ_CHECK_CONST(CONNECTION_CONSUME)
PQ_CHECK_CONST(CONNECTION_GSS_STARTUP)
dnl
dnl PQ_CHECK_FUNC(sym, fail-hard)

View File

@ -2139,6 +2139,15 @@ PHP_MINIT_FUNCTION(pqconn)
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("AUTH_OK"), CONNECTION_AUTH_OK);
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("SSL_STARTUP"), CONNECTION_SSL_STARTUP);
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("SETENV"), CONNECTION_SETENV);
#ifdef HAVE_CONNECTION_CHECK_WRITABLE
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("CHECK_WRITABLE"), CONNECTION_CHECK_WRITABLE);
#endif
#ifdef HAVE_CONNECTION_CONSUME
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("CONSUME"), CONNECTION_CONSUME);
#endif
#ifdef HAVE_CONNECTION_GSS_STARTUP
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("GSS_STARTUP"), CONNECTION_GSS_STARTUP);
#endif
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("TRANS_IDLE"), PQTRANS_IDLE);
zend_declare_class_constant_long(php_pqconn_class_entry, ZEND_STRL("TRANS_ACTIVE"), PQTRANS_ACTIVE);