Skip to content

Commit 6e52acd

Browse files
committed
Sync with upstream: Add HAVE_PQCLOSEPREPARED
1 parent cc117c9 commit 6e52acd

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

cmake/ext/pdo_pgsql/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ if(TARGET PostgreSQL::PostgreSQL)
8080
HAVE_PG_RESULT_MEMORY_SIZE
8181
)
8282
endif()
83+
84+
# Available since PostgreSQL 17.
85+
if(PostgreSQL_VERSION_STRING VERSION_GREATER_EQUAL 17)
86+
check_library_exists(
87+
PostgreSQL::PostgreSQL
88+
PQclosePrepared
89+
""
90+
HAVE_PQCLOSEPREPARED
91+
)
92+
endif()
8393
endif()
8494

8595
if(RE2C_FOUND)

cmake/main/config.w32.cmake.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,10 @@
11521152
function. */
11531153
#cmakedefine HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP 1
11541154

1155+
/* Define to 1 if libpq has the 'PQclosePrepared' function (PostgreSQL 17 or
1156+
later). */
1157+
#cmakedefine HAVE_PQCLOSEPREPARED 1
1158+
11551159
/* Define to 1 if PGVerbosity enum has PQERRORS_SQLSTATE. */
11561160
#cmakedefine HAVE_PQERRORS_SQLSTATE 1
11571161

cmake/main/php_config.cmake.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,10 @@
11431143
function. */
11441144
#cmakedefine HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP 1
11451145

1146+
/* Define to 1 if libpq has the 'PQclosePrepared' function (PostgreSQL 17 or
1147+
later). */
1148+
#cmakedefine HAVE_PQCLOSEPREPARED 1
1149+
11461150
/* Define to 1 if PGVerbosity enum has PQERRORS_SQLSTATE. */
11471151
#cmakedefine HAVE_PQERRORS_SQLSTATE 1
11481152

0 commit comments

Comments
 (0)