Re: Sun inline assembler ... - Mailing list pgsql-bugs

From Michael Fuhr
Subject Re: Sun inline assembler ...
Date
Msg-id 20050707150836.GA62520@winnie.fuhr.org
Whole thread Raw
In response to Sun inline assembler ...  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Responses Re: Sun inline assembler ...  (Hans-Jürgen Schönig <postgres@cybertec.at>)
List pgsql-bugs
On Thu, Jul 07, 2005 at 04:53:16PM +0200, Hans-Jürgen Schönig wrote:
> I have some minor troubles when using the Sun Compiler 9 on Solaris 9.
> The spinlock assembler code is somehow broken for Solaris 9 and Solaris
> 10 (it works for Sun CC 8).
>
> The following patch fixes this:
>
> [hs@localhost postgresql-8.0.1]$ cd src/backend/storage/lmgr/
> [hs@localhost lmgr]$ diff s_lock.c /tmp/fixed_s_lock.c
> 248,249c248,249
> <       asm(".section \"data\"");
> <       asm(".section \"text\"");
> ---
> >       asm(".seg \"data\"");
> >       asm(".seg \"text\"");

There's already an #ifdef around that code -- is it not matching
correctly for your compiler?  Here's what I see in REL8_0_STABLE
and in HEAD (s_lock.c 1.35):

244 #ifdef SUNOS4_CC
245     asm(".seg \"data\"");
246     asm(".seg \"text\"");
247 #else
248     asm(".section \"data\"");
249     asm(".section \"text\"");
250 #endif

This looks like the thread that led to the above code:

http://archives.postgresql.org/pgsql-patches/2004-12/msg00213.php

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-bugs by date:

Previous
From: "Steve Bennett"
Date:
Subject: BUG #1757: timestamp 'epoch' is not absolute
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #1756: PQexec eats huge amounts of memory