Re: Further patch for VS2005 - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: Further patch for VS2005
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA0FAA1@algol.sollentuna.se
Whole thread Raw
In response to Re: Further patch for VS2005  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
> > *** src/pl/plpython/plpython.c    25 Jun 2006 00:18:24
> -0000    1.83
> > --- src/pl/plpython/plpython.c    26 Jun 2006 13:58:56 -0000
> > ***************
> > *** 10,16 ****
> > --- 10,19 ----
> >   /* 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 <Python.h>
> > + #undef errcode
> >   #define _DEBUG
> >   #else
> >   #include <Python.h>
>
> BTW, it strikes me as a fairly bad idea to be including
> <Python.h> first; that goes directly against the conventions
> we established to be sure that largefile support doesn't
> break.  Has anyone looked into making plpython.c conform to
> project standards by including postgres.h first?

Not me. Last time I did something like that it came back and bit me
because apparantly python does things significantly different on
different platforms. Now that we have the buildfarm it might be worth a
try. I don't have a *nix box around with python ATM, but if nobody beats
me to it I can try it later...

//Magnus

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Further patch for VS2005
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Overhead for stats_command_string et al, take 2