mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
For application to HEAD, following community review.
* Changes incorrect CYGWIN defines to __CYGWIN__ * Some localtime returns NULL checks (when unchecked cause SEGVs under Win32 regression tests) * Rationalized CreateSharedMemoryAndSemaphores and AttachSharedMemoryAndSemaphores (Bruce, I finally remembered to do it); requires attention. Claudio Natoli
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.31 2004/02/08 22:28:56 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.32 2004/02/25 19:41:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -254,7 +254,7 @@ PGSharedMemoryCreate(uint32 size, bool makePrivate, int port)
|
||||
{
|
||||
void* origUsedShmemSegAddr = UsedShmemSegAddr;
|
||||
|
||||
#ifdef CYGWIN
|
||||
#ifdef __CYGWIN__
|
||||
/* cygipc (currently) appears to not detach on exec. */
|
||||
PGSharedMemoryDetach();
|
||||
UsedShmemSegAddr = origUsedShmemSegAddr;
|
||||
@ -373,7 +373,7 @@ PGSharedMemoryDetach(void)
|
||||
if (UsedShmemSegAddr != NULL)
|
||||
{
|
||||
if ((shmdt(UsedShmemSegAddr) < 0)
|
||||
#if (defined(EXEC_BACKEND) && defined(CYGWIN))
|
||||
#if (defined(EXEC_BACKEND) && defined(__CYGWIN__))
|
||||
/* Work-around for cygipc exec bug */
|
||||
&& shmdt(NULL) < 0
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user