check for new connection status constants in pg-10+
authorMichael Wallner <mike@php.net>
Thu, 24 Sep 2020 14:10:21 +0000 (16:10 +0200)
committerMichael Wallner <mike@php.net>
Thu, 24 Sep 2020 14:10:45 +0000 (16:10 +0200)
config9.m4
src/php_pqconn.c

index 8064df9d3346562c99ff573a737de484978d5065..9782d185720f6307f13784b6064e10ce1902fb18 100644 (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)
index fd5ec64b8f60084e2010836188ffcca484a1f666..3a44a952a944548d4d5c94945874c1aa9f546877 100644 (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);