More problems compiling PostgreSQL 6.4 on Digital Unix 4.0d - Mailing list pgsql-admin
From | Carl Riches |
---|---|
Subject | More problems compiling PostgreSQL 6.4 on Digital Unix 4.0d |
Date | |
Msg-id | Pine.OSF.4.02A.9812170930230.20030-100000@hilbert1.ms.washington.edu Whole thread Raw |
In response to | Re: [ADMIN] Problems compiling PostgreSQL 6.4 on Digital Unix 4.0d (Bruce Momjian <maillist@candle.pha.pa.us>) |
List | pgsql-admin |
I am still having problems compiling PostgreSQL 6.4 on Digital Unix 4.0d (DEC Alpha platform). The problems now are with the macro: S_INIT_LOCK( ) I can't figure out how this macro is supposed to work and what data type it is asking for. Here are the error messages and code snippets of interest. Can someone help me out? Thanks, Carl From: src/include/storage/s_lock.h: #if defined(__alpha) /* * OSF/1 (Alpha AXP) * * Note that slock_t on the Alpha AXP is msemaphore instead of char * (see storage/ipc.h). */ #define TAS(lock) (msem_lock((lock), MSEM_IF_NOWAIT) < 0) #define S_UNLOCK(lock) msem_unlock((lock), 0) #define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED) #define S_LOCK_FREE(lock) (!(lock)->msem_state) #endif /* __alpha */ From: src/backend/storage/buffer/buf_init.c #ifdef HAS_TEST_AND_SET S_INIT_LOCK(&(buf->io_in_progress_lock)); #endif The resulting error message: gcc -I../../../include -I../../../backend -DNOFIXADE -Wall -Wmissing-prototypes -I../.. -c buf_init.c -o buf_init.o ../../../include/storage/s_lock.h: In function `tas': In file included from buf_init.c:29: ../../../include/storage/s_lock.h:102: aggregate value used where an integer was expected buf_init.c: In function `InitBufferPool': buf_init.c:234: incompatible types in assignment gmake[3]: *** [buf_init.o] Error 1 From: src/backend/storage/ipc/ipc.c void CreateAndInitSLockMemory(IPCKey key) { int id; SLock *slckP; SLockMemoryId = IpcMemoryCreate(key,SLockMemorySize,0700); AttachSLockMemory(key); *FreeSLockPP = NULL; *UnusedSLockIP = (int) FIRSTFREELOCKID; for (id = 0; id < (int) FIRSTFREELOCKID; id++) { slckP = &(SLockArray[id]); S_INIT_LOCK(&(slckP->locklock)); slckP->flag = NOLOCK; slckP->nshlocks = 0; S_INIT_LOCK(&(slckP->shlock)); S_INIT_LOCK(&(slckP->exlock)); S_INIT_LOCK(&(slckP->comlock)); slckP->next = NULL; } return; } void AttachSLockMemory(IPCKey key) { struct ipcdummy *slockM; if (SLockMemoryId == -1) SLockMemoryId = IpcMemoryIdGet(key, SLockMemorySize); if (SLockMemoryId == -1) elog(FATAL, "SLockMemory not in shared memory"); slockM = (struct ipcdummy *) IpcMemoryAttach(SLockMemoryId); if (slockM == IpcMemAttachFailed) elog(FATAL, "AttachSLockMemory: could not attach segment"); FreeSLockPP = (SLock **) &(slockM->free); UnusedSLockIP = (int *) &(slockM->unused); SLockMemoryLock = (slock_t *) &(slockM->memlock); S_INIT_LOCK(SLockMemoryLock); SLockArray = (SLock *) &(slockM->slocks[0]); return; } The resulting error message: gcc -I../../../include -I../../../backend -DNOFIXADE -Wall -Wmissing-prototypes -I../.. -c ipc.c -o ipc.o In file included from ../../../include/libpq/libpq-be.h:21, from ../../../include/libpq/libpq.h:20, from ipc.c:41: ../../../include/libpq/hba.h:22: warning: `MAP_FILE' redefined /usr/include/sys/mman.h:73: warning: this is the location of the previous definition ../../../include/storage/s_lock.h: In function `tas': In file included from ipc.c:36: ../../../include/storage/s_lock.h:102: aggregate value used where an integer was expected ipc.c: In function `IpcSemaphoreCreate': ipc.c:367: warning: cast to pointer from integer of different size ipc.c: In function `IpcMemoryCreate': ipc.c:569: warning: cast to pointer from integer of different size ipc.c: In function `CreateAndInitSLockMemory': ipc.c:699: incompatible types in assignment ipc.c:702: incompatible types in assignment ipc.c:703: incompatible types in assignment ipc.c:704: incompatible types in assignment ipc.c: In function `AttachSLockMemory': ipc.c:725: incompatible types in assignment gmake[3]: *** [ipc.o] Error 1 Again, thanks for any help you can provide. Carl Carl G. Riches Software Engineer Department of Mathematics Box 354350 voice: 206-543-5082 or 206-616-3636 University of Washington fax: 206-543-0397 Seattle, WA 98195-4350 internet: riches@ms.washington.edu
pgsql-admin by date: