Fix one more cast for _open_osfhandle().

Tsutomu Yamada
This commit is contained in:
Magnus Hagander 2010-01-02 12:01:29 +00:00
parent f509944e6e
commit 13c5fdb5c8
2 changed files with 7 additions and 3 deletions

View File

@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.597 2009/12/19 01:32:34 sriggs Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.598 2010/01/02 12:01:29 mha Exp $
* *
* NOTES * NOTES
* *
@ -403,7 +403,11 @@ typedef struct
int ListenSocket[MAXLISTEN]; int ListenSocket[MAXLISTEN];
long MyCancelKey; long MyCancelKey;
int MyPMChildSlot; int MyPMChildSlot;
#ifndef WIN32
unsigned long UsedShmemSegID; unsigned long UsedShmemSegID;
#else
HANDLE UsedShmemSegID;
#endif
void *UsedShmemSegAddr; void *UsedShmemSegAddr;
slock_t *ShmemLock; slock_t *ShmemLock;
VariableCache ShmemVariableCache; VariableCache ShmemVariableCache;

View File

@ -18,7 +18,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.53 2009/11/19 02:45:33 tgl Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.54 2010/01/02 12:01:29 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -573,7 +573,7 @@ SysLogger_Start(void)
* chunking protocol. * chunking protocol.
*/ */
fflush(stderr); fflush(stderr);
fd = _open_osfhandle((long) syslogPipe[1], fd = _open_osfhandle((intptr_t) syslogPipe[1],
_O_APPEND | _O_BINARY); _O_APPEND | _O_BINARY);
if (dup2(fd, _fileno(stderr)) < 0) if (dup2(fd, _fileno(stderr)) < 0)
ereport(FATAL, ereport(FATAL,