From 1d729ab40e410bf952edfdbe363163f40fe15072 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 24 Aug 2014 01:43:12 +0100 Subject: [PATCH] Dropped HAVE_PQFREEMEM flag It was necessary before PG 7.4, in versions which have long been unsupported. --- psycopg/config.h | 5 ----- setup.cfg | 2 +- setup.py | 3 ++- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/psycopg/config.h b/psycopg/config.h index 45157709..b6cd4190 100644 --- a/psycopg/config.h +++ b/psycopg/config.h @@ -152,11 +152,6 @@ static double round(double num) } #endif -/* postgresql < 7.4 does not have PQfreemem */ -#ifndef HAVE_PQFREEMEM -#define PQfreemem free -#endif - /* resolve missing isinf() function for Solaris */ #if defined (__SVR4) && defined (__sun) #include diff --git a/setup.cfg b/setup.cfg index 86fdd42b..90a47dd4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [build_ext] -define=HAVE_PQFREEMEM +define= # PSYCOPG_DISPLAY_SIZE enable display size calculation (a little slower) # HAVE_PQFREEMEM should be defined on PostgreSQL >= 7.4 diff --git a/setup.py b/setup.py index f08a4f3f..f22f6b1b 100644 --- a/setup.py +++ b/setup.py @@ -538,7 +538,8 @@ else: # when called e.g. with "pip -e git+url'. This results in declarations # duplicate on the commandline, which I hope is not a problem. for define in parser.get('build_ext', 'define').split(','): - define_macros.append((define, '1')) + if define: + define_macros.append((define, '1')) # build the extension