From 41dd7a109535f61ed04cc4c7474e4c82bfaa85bc Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Mon, 16 Feb 2009 10:00:34 +0100 Subject: [PATCH] Compile again on modern FreeBSD --- ChangeLog | 5 +++++ psycopg/config.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 27c63d84..da412b1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-16 Federico Di Gregorio + + * FreeBSD now has round(). Modified config.h as suggested by + Jeroen Ruigrok van der Werven. + 2009-02-06 Federico Di Gregorio * Applied patch by Markus Demleitner to make executemany() return diff --git a/psycopg/config.h b/psycopg/config.h index db9f2844..52d15234 100644 --- a/psycopg/config.h +++ b/psycopg/config.h @@ -129,7 +129,7 @@ static struct tm *localtime_r(time_t *t, struct tm *tm) #define inline #endif -#if defined(__FreeBSD__) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) || defined(sun) +#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) || defined(sun) /* what's this, we have no round function either? */ static double round(double num) {