# HG changeset patch # User Sebastien Jodogne # Date 1607791747 -3600 # Node ID 0246923d4df9e29f507f1153934b40b1d818daf3 # Parent 1b67c6f8037c6c6b1bc35419aa8fad1a27e8a3ea trying to fix msvc builds with postgresql diff -r 1b67c6f8037c -r 0246923d4df9 Framework/PostgreSQL/PostgreSQLIncludes.h --- a/Framework/PostgreSQL/PostgreSQLIncludes.h Fri Dec 11 18:51:08 2020 +0100 +++ b/Framework/PostgreSQL/PostgreSQLIncludes.h Sat Dec 12 17:49:07 2020 +0100 @@ -28,16 +28,6 @@ #include #include -/** - * This include must be before including "c.h" from PostgreSQL, - * otherwise the function "static bool - * boost::date_time::special_values_parser::__builtin_expect()" from Boost clashes with macro - * "__builtin_expect()" used by PostgreSQL 11. - **/ -#include -#include - // PostgreSQL includes #include @@ -45,11 +35,5 @@ # error PG_VERSION_NUM is not defined #endif -#if PG_VERSION_NUM >= 110000 -# include -# undef LOG // This one comes from , and conflicts with -#endif - #include -#include -#include +#include diff -r 1b67c6f8037c -r 0246923d4df9 Framework/PostgreSQL/PostgreSQLResult.cpp --- a/Framework/PostgreSQL/PostgreSQLResult.cpp Fri Dec 11 18:51:08 2020 +0100 +++ b/Framework/PostgreSQL/PostgreSQLResult.cpp Sat Dec 12 17:49:07 2020 +0100 @@ -22,6 +22,13 @@ #include "PostgreSQLIncludes.h" // Must be the first #include "PostgreSQLResult.h" +// Get "ntohl()" defined +#if defined(_WIN32) +# include +#else +# include +#endif + #include "../Common/BinaryStringValue.h" #include "../Common/FileValue.h" #include "../Common/Integer64Value.h"