]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in PDO PostgreSQL extension
authorGeorge Peter Banyard <girgias@php.net>
Wed, 20 May 2020 13:41:30 +0000 (15:41 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Wed, 20 May 2020 14:29:53 +0000 (16:29 +0200)
ext/pdo_pgsql/pgsql_driver.c
ext/pdo_pgsql/pgsql_statement.c

index f963c7e4471dddbf964d1cdcf9c891d558dd6228..685a64e451c96512ed52fcc5011543ca11c9393f 100644 (file)
@@ -156,7 +156,7 @@ static int pgsql_lob_seek(php_stream *stream, zend_off_t offset, int whence,
                zend_off_t *newoffset)
 {
        struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract;
-#if HAVE_PG_LO64 && ZEND_ENABLE_ZVAL_LONG64
+#if defined(HAVE_PG_LO64) && defined(ZEND_ENABLE_ZVAL_LONG64)
        zend_off_t pos = lo_lseek64(self->conn, self->lfd, offset, whence);
 #else
        zend_off_t pos = lo_lseek(self->conn, self->lfd, offset, whence);
@@ -1060,7 +1060,7 @@ static PHP_METHOD(PDO, pgsqlGetNotify)
        if (ms_timeout < 0) {
                php_error_docref(NULL, E_WARNING, "Invalid timeout");
                RETURN_FALSE;
-#if ZEND_ENABLE_ZVAL_LONG64
+#ifdef ZEND_ENABLE_ZVAL_LONG64
        } else if (ms_timeout > INT_MAX) {
                php_error_docref(NULL, E_WARNING, "Timeout was shrunk to %d", INT_MAX);
                ms_timeout = INT_MAX;
index 1b728951f55f7aabb2abfa0bd150c4152e07d872..0edb3d7f8e8d9636cc4ab4982f141bbd0a66f271 100644 (file)
@@ -27,7 +27,7 @@
 #include "pdo/php_pdo_driver.h"
 #include "php_pdo_pgsql.h"
 #include "php_pdo_pgsql_int.h"
-#if HAVE_NETINET_IN_H
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif