From 4f4d62a5b5197127b19e3a5bc1d7fe0efe32eece Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 6 Jul 2006 01:55:51 +0000 Subject: Attached patch is required ot build with the CRT that comes with Visual Studio 2005. Basically MS defined errcode in the headers with a typedef, so we have to #define it out of the way. While at it, fix a function declaration in plpython that didn't match the implementation (volatile missing). Magnus Hagander --- src/pl/plpython/plpython.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/pl/plpython/plpython.c') diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index 20974bb4d95..164df875a5a 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -1,7 +1,7 @@ /********************************************************************** * plpython.c - python as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.83 2006/06/25 00:18:24 momjian Exp $ + * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.84 2006/07/06 01:55:51 momjian Exp $ * ********************************************************************* */ @@ -10,7 +10,10 @@ /* Python uses #pragma to bring in a non-default libpython on VC++ if * _DEBUG is defined */ #undef _DEBUG +/* Also hide away errcode, since we load Python.h before postgres.h */ +#define errcode __vc_errcode #include +#undef errcode #define _DEBUG #else #include @@ -2360,7 +2363,7 @@ PLy_init_plpy(void) /* the python interface to the elog function * don't confuse these with PLy_elog */ -static PyObject *PLy_output(int, PyObject *, PyObject *); +static PyObject *PLy_output(volatile int, PyObject *, PyObject *); static PyObject * PLy_debug(PyObject * self, PyObject * args) -- cgit v1.2.3