Thread: Re: [HACKERS] compile warnings

Re: [HACKERS] compile warnings

From
Joe Conway
Date:
Joe Conway wrote:
> Tom Lane wrote:
>> Joe Conway <mail@joeconway.com> writes:
>>> In addition to the ecpg warnings mentioned by Tom, I'm also seeing
>>> compile warnings wrt plpython:
>>
>> This is surely not a "must fix tomorrow" issue, but please look into it
>> when you get back from your road trip.
>
> I find that simply putting
>   #include <Python.h>
> prior to
>   #include "postgres.h"
> in plpython.c eliminates the warnings, and compiles fine, but it isn't
> clear to me that it is safe. Thoughts?

If there are no objections, I plan to commit the attached in a few hours.

Thanks,

Joe
Index: src/pl/plpython/plpython.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/pl/plpython/plpython.c,v
retrieving revision 1.51
diff -c -r1.51 plpython.c
*** src/pl/plpython/plpython.c    31 Jul 2004 20:55:45 -0000    1.51
--- src/pl/plpython/plpython.c    4 Aug 2004 22:41:44 -0000
***************
*** 34,39 ****
--- 34,40 ----
   *********************************************************************
   */

+ #include <Python.h>
  #include "postgres.h"

  /* system stuff */
***************
*** 54,60 ****
  #include "utils/syscache.h"
  #include "utils/typcache.h"

- #include <Python.h>
  #include <compile.h>
  #include <eval.h>

--- 55,60 ----