# HG changeset patch # User Alain Mazy # Date 1764352912 -3600 # Node ID 923b00f7aa2dcbf4ee7a6a6deeeeae1c23a38324 # Parent 36f4a9992d1145238abe7d6691089e1000d977f6 try to fix vs2008 build diff -r 36f4a9992d11 -r 923b00f7aa2d Resources/CMake/PostgreSQLConfiguration.cmake --- a/Resources/CMake/PostgreSQLConfiguration.cmake Fri Nov 28 15:43:35 2025 +0100 +++ b/Resources/CMake/PostgreSQLConfiguration.cmake Fri Nov 28 19:01:52 2025 +0100 @@ -97,7 +97,24 @@ # endif #endif ") + + if (MSVC) + # Older versions of Microsoft Visual Studio (notably MSVC2008) + # don't have inttypes.h. + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i + ${CMAKE_CURRENT_LIST_DIR}/../PostgreSQL/libpq-18.1-msvc.patch + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) + + if (Failure) + message(FATAL_ERROR "Error while patching a file") endif() + endif() + + + endif() elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") add_definitions( diff -r 36f4a9992d11 -r 923b00f7aa2d Resources/PostgreSQL/libpq-18.1-msvc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/PostgreSQL/libpq-18.1-msvc.patch Fri Nov 28 19:01:52 2025 +0100 @@ -0,0 +1,11 @@ +diff -ruN postgresql-18.1-orig/src/include/c.h postgresql-18.1/src/include/c.h +--- postgresql-18.1-orig/src/include/c.h 2025-11-28 18:54:52.627048100 +0100 ++++ postgresql-18.1/src/include/c.h 2025-11-28 18:56:22.269355100 +0100 +@@ -59,7 +59,6 @@ + #include "pg_config_os.h" /* config from include/port/PORTNAME.h */ + + /* System header files that should be available everywhere in Postgres */ +-#include + #include + #include + #include