Re: pg_bsd_indent compiles bytecode

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pg_bsd_indent compiles bytecode
Дата
Msg-id 20200630192956.j5a32bgtabfjwxf4@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: pg_bsd_indent compiles bytecode  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2020-06-29 21:27:48 -0400, Tom Lane wrote:
> I wrote:
> > Andres Freund <andres@anarazel.de> writes:
> >> The way that pg_bsd_indent defines its variables isn't standard C, as
> >> far as I can tell, which explains the errors I was getting. All the
> >> individual files include indent_globs.h, which declares/defines a bunch
> >> of variables. Since it doesn't use extern, they'll all end up as full
> >> definitions in each .o when -fno-common is used (the default now), hence
> >> the multiple definition errors. The only reason it works with -fcommon
> >> is that they'll end up processed as weak symbols and 'deduplicated' at
> >> link time.
> 
> > Ugh.  I agree that's pretty bogus, even if there's anything in the
> > C standard that allows it.  I'll put it on my to-do list.
> 
> I pushed the attached patch to the pg_bsd_indent repo.  Perhaps Piotr
> would like to absorb it into upstream.

Thanks!


> I don't intend to mark pg_bsd_indent with a new release number for
> this --- for people who successfully compiled, it's the same as before.

Makes sense to me.

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: SQL-standard function body
Следующее
От: Tom Lane
Дата:
Сообщение: Re: warnings for invalid function casts