Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f4d62a

Browse files
committed
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 matchthe implementation (volatile missing).Magnus Hagander
1 parenta77275f commit4f4d62a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎src/include/c.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.205 2006/06/26 23:53:14 momjian Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.206 2006/07/06 01:55:51 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -59,6 +59,9 @@
5959

6060
#if defined(_MSC_VER)|| defined(__BORLANDC__)
6161
#defineWIN32_ONLY_COMPILER
62+
#defineerrcode __vc_errcode
63+
#include<crtdefs.h>
64+
#undef errcode
6265
#endif
6366

6467
#include<stdio.h>

‎src/pl/plpython/plpython.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.83 2006/06/25 00:18:24 momjian Exp $
4+
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.84 2006/07/06 01:55:51 momjian Exp $
55
*
66
*********************************************************************
77
*/
@@ -10,7 +10,10 @@
1010
/* Python uses #pragma to bring in a non-default libpython on VC++ if
1111
* _DEBUG is defined */
1212
#undef _DEBUG
13+
/* Also hide away errcode, since we load Python.h before postgres.h */
14+
#defineerrcode __vc_errcode
1315
#include<Python.h>
16+
#undef errcode
1417
#define_DEBUG
1518
#else
1619
#include<Python.h>
@@ -2360,7 +2363,7 @@ PLy_init_plpy(void)
23602363
/* the python interface to the elog function
23612364
* don't confuse these with PLy_elog
23622365
*/
2363-
staticPyObject*PLy_output(int,PyObject*,PyObject*);
2366+
staticPyObject*PLy_output(volatileint,PyObject*,PyObject*);
23642367

23652368
staticPyObject*
23662369
PLy_debug(PyObject*self,PyObject*args)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp