summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@amdmi3.ru>2018-07-26 20:18:10 +0300
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-09-07 23:57:33 +0100
commit5ec573c83b145486cf310eb07267e8d2d0b49c79 (patch)
tree0d43241e45cf4efa3a8b1a0c5d6e1101eb0c1ac5
parent6af55ee51ca098850ccfc360fd3cde339af984f6 (diff)
downloadpsycopg2-5ec573c83b145486cf310eb07267e8d2d0b49c79.tar.gz
Remove obsolete and incorrect FreeBSD version condition
The FreeBSD-related condition which enables custom round() implementation is incorrect: one must include <sys/param.h> 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.
-rw-r--r--psycopg/config.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/psycopg/config.h b/psycopg/config.h
index a96864f..6b33c2c 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))