Skip to content

Commit 5ec573c

Browse files
AMDmi3dvarrazzo
authored andcommitted
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.
1 parent 6af55ee commit 5ec573c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

psycopg/config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ typedef unsigned __int64 uint64_t;
154154
#endif
155155

156156
/* what's this, we have no round function either? */
157-
#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) \
158-
|| (defined(_WIN32) && !defined(__GNUC__)) \
157+
#if (defined(_WIN32) && !defined(__GNUC__)) \
159158
|| (defined(sun) || defined(__sun__)) \
160159
&& (defined(__SunOS_5_8) || defined(__SunOS_5_9))
161160

0 commit comments

Comments
 (0)