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:
Tom Lane
2003-12-01 22:15:38 +00:00
parent 35ddc2edee
commit 5e2b99db95
6 changed files with 31 additions and 25 deletions

View File

@ -17,15 +17,13 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.9 2003/11/29 22:41:13 pgsql Exp $
* $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.10 2003/12/01 22:15:38 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PG_SHMEM_H
#define PG_SHMEM_H
typedef uint32 IpcMemoryKey; /* shared memory key passed to shmget(2) */
typedef struct PGShmemHeader /* standard header for all Postgres shmem */
{
int32 magic; /* magic # to identify Postgres segments */
@ -37,7 +35,7 @@ typedef struct PGShmemHeader /* standard header for all Postgres shmem */
#ifdef EXEC_BACKEND
extern IpcMemoryKey UsedShmemSegID;
extern unsigned long UsedShmemSegID;
extern void *UsedShmemSegAddr;
#endif