Re: pgsql: Move strtoint() to common

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Move strtoint() to common
Дата
Msg-id 20180315002851.GC617@paquier.xyz
обсуждение исходный текст
Ответ на Re: pgsql: Move strtoint() to common  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Move strtoint() to common  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-committers
On Wed, Mar 14, 2018 at 11:23:35AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> > I think the problem is rather that we somehow need to tell it to link
> > src/common/string.c into pgtypeslib.
>
> Yeah, that's what I supposed.
>
> Looking at pgtypeslib, there's already infrastructure for collecting
> stuff from src/port/, and I see you added some for src/common/ in
> its Makefile, but evidently not in the MSVC scripts.  It looks like
> the way the MSVC build works now is dependent on @pgportfiles.
>
> You could invent parallel infrastructure for src/common/, but I wonder
> whether the path of least resistance might not be to put strtoint()
> into src/port/ instead.

This line from the buildfarm failures is indicating that the handling of
restrict is incorrect:
src/common/string.c(50): error C2146: syntax error : missing ')' before
identifier 'str'
[C:\buildfarm\buildenv\HEAD\pgsql.build\libpgtypes.vcxproj]

So I concur with David that we ought to do something for that.  One way
to do things simply is to remove the restrict keyword as suggested
upthread.  Another one, which David has not considered, is that there is
a pg_restrict macro defined in pg_config.h.  So you could just use that.

Attached is a patch which fixes the compilation failure on Windows for
me.  That should put the buildfarm back to green.
--
Michael

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pgsql: Remove pg_class.relhaspkey
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: logical replication: fix OID type mapping mechanism