Re: [BUGS] ISM shared memory on solaris - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: [BUGS] ISM shared memory on solaris |
Date | |
Msg-id | 200310260453.h9Q4r5w19896@candle.pha.pa.us Whole thread Raw |
In response to | Re: [BUGS] ISM shared memory on solaris (Josh Wilmes <jwilmes@cisco.com>) |
Responses |
Re: [BUGS] ISM shared memory on solaris
|
List | pgsql-patches |
OK, attached patch applied. I tested for 'sun' rather than 'solaris'. --------------------------------------------------------------------------- Josh Wilmes wrote: > > Bruce Momjian wrote: > > > Josh Wilmes wrote: > > > >>Nope, __solaris__ is not defined on our system either. > > > > > > I thought our configure defined __portname__ for every platform, but I > > don't see that anywhere, so it seems we rely on the compiler to supply > > defines for the cpu and OS. > > > > Does src/tools/ccsym show you your defines? I would like to have > > something that identifies Solaris rather than something that checks for > > ISM so that if the ISM define isn't found, we throw an error and we hear > > about it. > > That would be preferable- i didn't know what was safe to assume would > always be defined. > > ccsym is pretty neat. Here's what it shows (gcc) > > __GNUC__=2 > __GNUC_MINOR__=95 > sparc > sun > unix > __svr4__ > __SVR4 > __sparc__ > __sun__ > __unix__ > __svr4__ > __SVR4 > __sparc > __sun > __unix > system=unix > system=svr4 > __GCC_NEW_VARARGS__ > cpu=sparc > machine=sparc > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/backend/port/sysv_shmem.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/port/sysv_shmem.c,v retrieving revision 1.21 diff -c -c -r1.21 sysv_shmem.c *** src/backend/port/sysv_shmem.c 13 Oct 2003 22:47:15 -0000 1.21 --- src/backend/port/sysv_shmem.c 26 Oct 2003 04:52:33 -0000 *************** *** 133,139 **** on_shmem_exit(IpcMemoryDelete, Int32GetDatum(shmid)); /* OK, should be able to attach to the segment */ ! #if defined(solaris) && defined(__sparc__) /* use intimate shared memory on SPARC Solaris */ memAddress = shmat(shmid, 0, SHM_SHARE_MMU); #else --- 133,139 ---- on_shmem_exit(IpcMemoryDelete, Int32GetDatum(shmid)); /* OK, should be able to attach to the segment */ ! #if defined(sun) && defined(__sparc__) /* use intimate shared memory on SPARC Solaris */ memAddress = shmat(shmid, 0, SHM_SHARE_MMU); #else *************** *** 352,358 **** hdr = (PGShmemHeader *) shmat(*shmid, UsedShmemSegAddr, ! #if defined(solaris) && defined(__sparc__) /* use intimate shared memory on Solaris */ SHM_SHARE_MMU #else --- 352,358 ---- hdr = (PGShmemHeader *) shmat(*shmid, UsedShmemSegAddr, ! #if defined(sun) && defined(__sparc__) /* use intimate shared memory on Solaris */ SHM_SHARE_MMU #else
pgsql-patches by date: