aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpython.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-06-25 00:18:24 +0000
committerBruce Momjian <bruce@momjian.us>2006-06-25 00:18:24 +0000
commitd8f75d4131589f45e77189e93190a5d5f04814a7 (patch)
treedeb65c5014aefd1f040a800c56decf327bf36b4e /src/pl/plpython/plpython.c
parentac7a126d0c261d4013f1c8ff55d0895353587dea (diff)
downloadpostgresql-d8f75d4131589f45e77189e93190a5d5f04814a7.tar.gz
postgresql-d8f75d4131589f45e77189e93190a5d5f04814a7.zip
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
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r--src/pl/plpython/plpython.c10
1 files changed, 9 insertions, 1 deletions
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 <Python.h>
+#define _DEBUG
+#else
+#include <Python.h>
+#endif
#include "postgres.h"
/* system stuff */