From eacf6febfea3a2ae130585027c48e417bae59ec3 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 19 May 2010 11:36:39 +0100 Subject: [PATCH] Warn on declarations not at beginning of the block. They are accepted by gcc but not by MS compilers. --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index d69cab31..97f04b72 100644 --- a/setup.py +++ b/setup.py @@ -198,6 +198,12 @@ class psycopg_build_ext(build_ext): self.libraries.append('ssl') self.libraries.append('crypto') + def finalize_linux2(self): + """Finalize build system configuration on GNU/Linux platform.""" + # tell piro that GCC is fine and dandy, but not so MS compilers + for ext in self.extensions: + ext.extra_compile_args.append('-Wdeclaration-after-statement') + def finalize_options(self): """Complete the build system configuation.""" build_ext.finalize_options(self)