Mercurial > hg > orthanc-databases
changeset 59:318c1ccb787c
fix build with postgresql-11
author | s.jodogne@gmail.com |
---|---|
date | Sun, 28 Oct 2018 12:29:22 +0100 |
parents | 0ff0ad51181d |
children | 412e30336847 |
files | Framework/PostgreSQL/PostgreSQLDatabase.cpp Framework/PostgreSQL/PostgreSQLResult.cpp Framework/PostgreSQL/PostgreSQLStatement.cpp |
diffstat | 3 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLDatabase.cpp Sun Oct 28 12:07:51 2018 +0100 +++ b/Framework/PostgreSQL/PostgreSQLDatabase.cpp Sun Oct 28 12:29:22 2018 +0100 @@ -26,6 +26,13 @@ #include "PostgreSQLTransaction.h" #include "../Common/ImplicitTransaction.h" +#include <pg_config.h> + +#if PG_VERSION_NUM >= 110000 +# include <postgres.h> +# undef LOG // This one comes from <postgres.h>, and conflicts with <Core/Logging.h> +#endif + #include <Core/Logging.h> #include <Core/OrthancException.h>
--- a/Framework/PostgreSQL/PostgreSQLResult.cpp Sun Oct 28 12:07:51 2018 +0100 +++ b/Framework/PostgreSQL/PostgreSQLResult.cpp Sun Oct 28 12:29:22 2018 +0100 @@ -27,6 +27,13 @@ #include "../Common/NullValue.h" #include "../Common/Utf8StringValue.h" +#include <pg_config.h> + +#if PG_VERSION_NUM >= 110000 +# include <postgres.h> +# undef LOG // This one comes from <postgres.h>, and conflicts with <Core/Logging.h> +#endif + #include <Core/OrthancException.h> #include <Core/Logging.h>
--- a/Framework/PostgreSQL/PostgreSQLStatement.cpp Sun Oct 28 12:07:51 2018 +0100 +++ b/Framework/PostgreSQL/PostgreSQLStatement.cpp Sun Oct 28 12:29:22 2018 +0100 @@ -29,6 +29,13 @@ #include "../Common/Utf8StringValue.h" #include "PostgreSQLResult.h" +#include <pg_config.h> + +#if PG_VERSION_NUM >= 110000 +# include <postgres.h> +# undef LOG // This one comes from <postgres.h>, and conflicts with <Core/Logging.h> +#endif + #include <Core/Logging.h> #include <Core/OrthancException.h> #include <Core/Toolbox.h>