From d8f75d4131589f45e77189e93190a5d5f04814a7 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 25 Jun 2006 00:18:24 +0000 Subject: Fix Win32/Cygwin problems: After updating to the latest cvs, and also building most of the addons (like PLs), the following patch is neededf for win32 + Visual C++. * Switch to use the new win32 semaphore code * Rename win32_open to pgwin32_open. win32_open collides with symbols defined in Perl. MingW didn't detect ig, MSVC did. And it's a bit too generic a name to export globally, imho... * Python defines some partially broken #pragmas in the headers when doing a debug build. Workaround. Magnus Hagander --- src/pl/plpython/plpython.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/pl/plpython/plpython.c') diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index bc8310a045b..20974bb4d95 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -1,12 +1,20 @@ /********************************************************************** * plpython.c - python as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.82 2006/06/16 18:42:23 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.83 2006/06/25 00:18:24 momjian Exp $ * ********************************************************************* */ +#if defined(_MSC_VER) && defined(_DEBUG) +/* Python uses #pragma to bring in a non-default libpython on VC++ if + * _DEBUG is defined */ +#undef _DEBUG #include +#define _DEBUG +#else +#include +#endif #include "postgres.h" /* system stuff */ -- cgit v1.2.3