Re: Tiny plpython fix

Lists: pgsql-hackerspgsql-patches
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Tiny plpython fix
Date: 2006-09-15 20:57:33
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0FB9B@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Seems __vc_errcode was used during Visual C++ beta at some point, and is
now declared deprecated in the system headers. This patch renames our
use of it to __msvc_errcode, so we don't conflict anymore.

//Magnus

Attachment Content-Type Size
plpython_vcerr.patch application/octet-stream 816 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Tiny plpython fix
Date: 2006-09-15 21:25:33
Message-ID: 6172.1158355533@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> Seems __vc_errcode was used during Visual C++ beta at some point, and is
> now declared deprecated in the system headers. This patch renames our
> use of it to __msvc_errcode, so we don't conflict anymore.

If we need this change in plpython, why not also src/include/port/win32.h?

regards, tom lane


From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Tiny plpython fix
Date: 2006-09-16 11:56:04
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0FBA8@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

> > Seems __vc_errcode was used during Visual C++ beta at some
> point, and
> > is now declared deprecated in the system headers. This
> patch renames
> > our use of it to __msvc_errcode, so we don't conflict anymore.
>
> If we need this change in plpython, why not also
> src/include/port/win32.h?

That's a very good question. It is because something that's pulled in
from the python headers causes the deprecation to show. Whereas when we
compile other things, the deprecation is hidden somewhere in an #ifdef
or so. But its definitly not *wrong* to fix it in win32.h as well.

The level of header files can be quite horrible to find this in, so I
haven't dug deep enough to find exactly which define it comes from. But
given that it's somewhere in the python headers, it's not something we
can change anyway.

//Magnus


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Tiny plpython fix
Date: 2006-09-16 13:37:08
Message-ID: 14593.1158413828@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>> If we need this change in plpython, why not also
>> src/include/port/win32.h?

> That's a very good question. It is because something that's pulled in
> from the python headers causes the deprecation to show. Whereas when we
> compile other things, the deprecation is hidden somewhere in an #ifdef
> or so. But its definitly not *wrong* to fix it in win32.h as well.

OK, changed it both places.

regards, tom lane