Re: s_lock.h default definitions are rather confused

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: s_lock.h default definitions are rather confused
Дата
Msg-id 20150110220336.GB27519@awork2.anarazel.de
обсуждение исходный текст
Ответ на s_lock.h default definitions are rather confused  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: s_lock.h default definitions are rather confused  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: s_lock.h default definitions are rather confused  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: s_lock.h default definitions are rather confused  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 2015-01-10 16:09:42 -0500, Tom Lane wrote:
> I've not tried to build HEAD on my HPPA dinosaur for awhile, but I did
> just now, and I am presented with boatloads of this:
> 
> ../../../src/include/storage/s_lock.h:759: warning: `S_UNLOCK' redefined
> ../../../src/include/storage/s_lock.h:679: warning: this is the location of the previous definition
> 
> which is not too surprising because the "default" definition at line 679
> precedes the HPPA-specific one at line 759.

That's 0709b7ee72e4bc71ad07b7120acd117265ab51d0.

Not too surprising that it broke and wasn't noticed without access to
hppa - the hppa code uses gcc inline assembly outside of the big
defined(__GNUC__) and inside the section headed "Platforms that use
non-gcc inline assembly".

> I'm not particularly interested in untangling the effects of the recent
> hackery in s_lock.h enough to figure out how the overall structure got
> broken, but I trust one of you will clean up the mess.

I think it's easiest solved by moving the gcc inline assembly up to the
rest of the gcc inline assembly. That'll require duplicating a couple
lines, but seems easier to understand nonetheless. Not pretty.

Given you got the error above, you used gcc. Have you used non-gcc
compiler on hppa recently? I seem to recall you mentioning that that
doesn't work sanely anymore? If so, perhaps we can just remove the !gcc
variant?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: INSERT ... ON CONFLICT UPDATE and RLS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: s_lock.h default definitions are rather confused