1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Fix Win32/Cygwin problems:

After updating to the latest cvs, and also building most of the addons
(like PLs), the following patch is neededf for win32 + Visual C++.

* Switch to use the new win32 semaphore code
* Rename win32_open to pgwin32_open. win32_open collides with symbols
defined in Perl. MingW didn't detect ig, MSVC did. And it's a bit too
generic a name to export globally, imho...
* Python defines some partially broken #pragmas in the headers when
doing a debug build. Workaround.

Magnus Hagander
This commit is contained in:
Bruce Momjian
2006-06-25 00:18:24 +00:00
parent ac7a126d0c
commit d8f75d4131
4 changed files with 19 additions and 8 deletions

View File

@ -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;