DEC 6.5 port

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-ports <pgsql-ports(at)postgreSQL(dot)org>
Subject: DEC 6.5 port
Date: 1999-05-10 21:40:58
Message-ID: 199905102140.RAA14609@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


OK, to install this, we need a context diff(diff -c) and some
port-specific trigger to enable this code vs. the original code. Can
anyone suggest a fix? Why does the old lock code fail?

> Bruce Momjian
> >
> > > I tried to get 6.5 up on a DEC UNIX 4.0 machine with gcc (egcs 2.91.60
> > > actually).
> > >
> > >
> > > to get it to build at all I had to do two things:
> > >
> > > 1) change 'MAP_FILE' to 'USERMAP_FILE' in hba.h and hba.c, 'MAP_FILE'
> > > conflicts with a definition in /usr/include/sys/mman.h. mman.h was
> > > included later and was clobbering the string with a constant
> >
> > I have changed MAP_FILE to USERMAP_FILE as you suggested.
> >
> >
> > >
> > > 2) I had to chop out the asm section in include/storage/s_lock.h
> >
> > What did you do, exactly?
> >
>
>
> 82,106c82,91
> < #define TAS(lock) tas(lock)
> < #define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
> <
> < static __inline__ int
> < tas(volatile slock_t *lock)
> < {
> < register slock_t _res;
> <
> < __asm__(" ldq $0, %0 \n\
> < bne $0, 3f \n\
> < ldq_l $0, %0 \n\
> < bne $0, 3f \n\
> < or $31, 1, $0 \n\
> < stq_c $0, %0 \n\
> < beq $0, 2f \n\
> < bis $31, $31, %1 \n\
> < mb \n\
> < jmp $31, 4f \n\
> < 2: or $31, 1, $0 \n\
> < 3: bis $0, $0, %1 \n\
> < 4: nop ": "=m"(*lock), "=r"(_res): :"0");
> <
> < return (int) _res;
> < }
> <
> ---
> > /*
> > * 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)
> 107a93
> >
>
>
>
> > --
> > Bruce Momjian | http://www.op.net/~candle
> > maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > + If your life is a hard drive, | 830 Blythe Avenue
> > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
> >
>

Browse pgsql-ports by date

  From Date Subject
Next Message Unprivileged user 1999-05-11 12:20:05 Port Bug Report: odbc library doesn't work on Solaris
Previous Message gjerde 1999-05-10 18:08:32 bin/psql compile fails on Redhat 6.0 (glibc 2.1)