From 41deda1950617adebcaa33d0f8024ef56459745a Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 26 Jul 2018 20:18:10 +0300 Subject: [PATCH 1/2] Remove obsolete and incorrect FreeBSD version condition The FreeBSD-related condition which enables custom round() implementation is incorrect: one must include to get __FreeBSD_version value, and since it's not included here, the check succeeds while it shouldn't. Before it worked somehow, but since python 3.7 it results in conflicting declarations of round(). The condition is also no longer needed since FreeBSD 5.3 is unsupported for 12 years. --- psycopg/config.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/psycopg/config.h b/psycopg/config.h index a96864f3..6b33c2cf 100644 --- a/psycopg/config.h +++ b/psycopg/config.h @@ -154,8 +154,7 @@ typedef unsigned __int64 uint64_t; #endif /* what's this, we have no round function either? */ -#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) \ - || (defined(_WIN32) && !defined(__GNUC__)) \ +#if (defined(_WIN32) && !defined(__GNUC__)) \ || (defined(sun) || defined(__sun__)) \ && (defined(__SunOS_5_8) || defined(__SunOS_5_9)) From 5d52dae286f396f9c5df27fe45e1861d5398a616 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 7 Sep 2018 23:56:15 +0100 Subject: [PATCH 2/2] Mention FreeBSD build fixed in news file --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 5ed2c127..e9408c52 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ What's new in psycopg 2.7.6 - Close named cursors if exist, even if `~cursor.execute()` wasn't called (:ticket:`#746`). +- Fixed building on modern FreeBSD versions with Python 3.7 (:ticket:`#755`) What's new in psycopg 2.7.5