mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Avoid assuming that type key_t is 32 bits, since it reportedly isn't
on 64-bit Solaris. Use a non-system-dependent datatype for UsedShmemSegID, namely unsigned long (which we were already assuming could hold a shmem key anyway, cf RecordSharedMemoryInLockFile).
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/port/sysv_sema.c,v 1.11 2003/11/29 19:51:54 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/port/sysv_sema.c,v 1.12 2003/12/01 22:15:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ union semun
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef uint32 IpcSemaphoreKey; /* semaphore key passed to semget(2) */
|
||||
typedef key_t IpcSemaphoreKey; /* semaphore key passed to semget(2) */
|
||||
typedef int IpcSemaphoreId; /* semaphore ID returned by semget(2) */
|
||||
|
||||
/*
|
||||
@@ -115,8 +115,8 @@ InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey, int numSems)
|
||||
*/
|
||||
ereport(FATAL,
|
||||
(errmsg("could not create semaphores: %m"),
|
||||
errdetail("Failed system call was semget(%d, %d, 0%o).",
|
||||
(int) semKey, numSems,
|
||||
errdetail("Failed system call was semget(%lu, %d, 0%o).",
|
||||
(unsigned long) semKey, numSems,
|
||||
IPC_CREAT | IPC_EXCL | IPCProtection),
|
||||
(errno == ENOSPC) ?
|
||||
errhint("This error does *not* mean that you have run out of disk space.\n"
|
||||
|
Reference in New Issue
Block a user