aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/pg_config.h.win325
-rw-r--r--src/include/port.h6
-rw-r--r--src/pl/plpython/plpython.c10
-rw-r--r--src/port/open.c6
4 files changed, 19 insertions, 8 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 430ab02a2f1..b2cf29246ea 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -628,7 +628,7 @@
/* #undef USE_SSL */
/* Define to select SysV-style semaphores. */
-#define USE_SYSV_SEMAPHORES 1
+/* #undef USE_SYSV_SEMAPHORES */
/* Define to select SysV-style shared memory. */
#define USE_SYSV_SHARED_MEMORY 1
@@ -636,6 +636,9 @@
/* Define to select unnamed POSIX semaphores. */
/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
+/* Define to select Win32-style semaphores. */
+#define USE_WIN32_SEMAPHORES
+
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
diff --git a/src/include/port.h b/src/include/port.h
index b195e95c7c1..7cb56083948 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.92 2006/06/07 22:24:45 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.93 2006/06/25 00:18:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -246,10 +246,10 @@ extern bool rmtree(char *path, bool rmtopdir);
/* open() replacement to allow delete of held files and passing
* of special options. */
-extern int win32_open(const char *, int,...);
+extern int pgwin32_open(const char *, int,...);
#ifndef FRONTEND
-#define open(a,b,c) win32_open(a,b,c)
+#define open(a,b,c) pgwin32_open(a,b,c)
#endif
#define popen(a,b) _popen(a,b)
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index bc8310a045b..20974bb4d95 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -1,12 +1,20 @@
/**********************************************************************
* plpython.c - python as a procedural language for PostgreSQL
*
- * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.82 2006/06/16 18:42:23 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.83 2006/06/25 00:18:24 momjian Exp $
*
*********************************************************************
*/
+#if defined(_MSC_VER) && defined(_DEBUG)
+/* Python uses #pragma to bring in a non-default libpython on VC++ if
+ * _DEBUG is defined */
+#undef _DEBUG
#include <Python.h>
+#define _DEBUG
+#else
+#include <Python.h>
+#endif
#include "postgres.h"
/* system stuff */
diff --git a/src/port/open.c b/src/port/open.c
index f0de771e8bb..4df74d8b51b 100644
--- a/src/port/open.c
+++ b/src/port/open.c
@@ -6,7 +6,7 @@
*
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/port/open.c,v 1.12 2006/03/05 15:59:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/open.c,v 1.13 2006/06/25 00:18:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,7 +19,7 @@
#include <fcntl.h>
#include <assert.h>
-int win32_open(const char *fileName, int fileFlags,...);
+int pgwin32_open(const char *fileName, int fileFlags,...);
static int
openFlagsToCreateFileFlags(int openFlags)
@@ -54,7 +54,7 @@ openFlagsToCreateFileFlags(int openFlags)
* - handle other flags? (eg FILE_FLAG_NO_BUFFERING/FILE_FLAG_WRITE_THROUGH)
*/
int
-win32_open(const char *fileName, int fileFlags,...)
+pgwin32_open(const char *fileName, int fileFlags,...)
{
int fd;
HANDLE h;