agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedproblems building src/backend/storage/ipc/s_lock.c
2+ messages / 2 participants
[nested] [flat]
* problems building src/backend/storage/ipc/s_lock.c
@ 1994-10-31 21:30 bachesta@angst.tera.com
1994-11-01 10:58 ` Re: problems building src/backend/storage/ipc/s_lock.c (Kai Petzke) <wpp@marie.physik.tu-berlin.d400.de>
0 siblings, 1 reply; 2+ messages in thread
From: bachesta@angst.tera.com @ 1994-10-31 21:30 UTC (permalink / raw)
To: legacy
I'm busy porting postgres 4.2 to NetBSD 1.0 and I came across the
following error:
cc -O -DPORTNAME_netbsd -DPOSTPORT='"4321"' -DDEADLOCK_TIMEOUT=60 -DPOSTGRESDIR='"/usr/local/postgres"' -DDATADIR='"/usr/local/postgres/data"' -DBINDIR='"/usr/local/postgres/bin"' -I/usr/postgres/src/backend/. -I/usr/postgres/src/backend/obj -I/usr/postgres/src/backend/tmp -I/usr/postgres/src/backend/port/netbsd -c /usr/postgres/src/backend/storage/ipc/s_lock.c
/usr/postgres/src/backend/storage/ipc/s_lock.c: In function `tas':
/usr/postgres/src/backend/storage/ipc/s_lock.c:283: `m' undeclared (first use this function)
/usr/postgres/src/backend/storage/ipc/s_lock.c:283: (Each undeclared identifier is reported only once
/usr/postgres/src/backend/storage/ipc/s_lock.c:283: for each function it appears in.)
*** Error code 1
The code segment that is giving me the problem looks like this
#if defined(__i386__) && defined(__GNUC__)
tas(lock)
slock_t *lock;
{
slock_t res;
__asm__("xchgb %0,%1":"=q" (res),"=m" (*m):"0" (0x1));
return(res);
}
line 283 is the __asm__ line. My questin is where is "m" supposed to
be defined and why does this compile for other OS's (i.e. linux freebsd),
or does it. I'm not an assembly guru so any help you can give me is
appreciated.
Thanks,
Jim Bachesta
bachesta@tera.com
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: problems building src/backend/storage/ipc/s_lock.c
1994-10-31 21:30 problems building src/backend/storage/ipc/s_lock.c bachesta@angst.tera.com
@ 1994-11-01 10:58 ` (Kai Petzke) <wpp@marie.physik.tu-berlin.d400.de>
0 siblings, 0 replies; 2+ messages in thread
From: (Kai Petzke) @ 1994-11-01 10:58 UTC (permalink / raw)
To: bachesta@angst.tera.com; +Cc: legacy
>
>
> I'm busy porting postgres 4.2 to NetBSD 1.0 and I came across the
> following error:
[...]
> #if defined(__i386__) && defined(__GNUC__)
>
> tas(lock)
> slock_t *lock;
> {
> slock_t res;
> __asm__("xchgb %0,%1":"=q" (res),"=m" (*m):"0" (0x1));
> return(res);
> }
>
> line 283 is the __asm__ line. My questin is where is "m" supposed to
> be defined and why does this compile for other OS's (i.e. linux freebsd),
> or does it. I'm not an assembly guru so any help you can give me is
> appreciated.
No, the (*m) is wrong. It should be (*lock).
You have started your port from the core distribution of Postgres,
which has only part of the linux or FreeBSD specific changes in
it (eg. those, that Paul Aoki came around to include).
I recommend you to get the FreeBSD (or linux) patches, and apply
them, before you continue. It will save you lots of doubled work.
Kai
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1994-11-01 10:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-10-31 21:30 problems building src/backend/storage/ipc/s_lock.c bachesta@angst.tera.com
1994-11-01 10:58 ` (Kai Petzke) <wpp@marie.physik.tu-berlin.d400.de>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox