Re: Compiler warnings with MinGW

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Compiler warnings with MinGW
Дата
Msg-id 6198e51f-d80a-6690-2b67-fa7876eae802@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Compiler warnings with MinGW  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Ответы Re: Compiler warnings with MinGW  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 2019-07-19 14:41, Andrew Dunstan wrote:
> On 7/19/19 1:08 AM, Michael Paquier wrote:
>> Just browsing through the logs of the buildfarm, I have noticed that
>> some buildfarm animals complain with warnings (jacana uses MinGW):
>> https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=jacana&dt=2019-07-19%2001%3A45%3A28&stg=make
>>
>> There are two of them:
>> c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/backend/port/win32/mingwcompat.c:60:1:
>> warning: 'RegisterWaitForSingleObject' redeclared without dllimport
>> attribute: previous dllimport ignored [-Wattributes]
>>
>> The first one has been discussed already some time ago and is a cause
>> of 811be893, but nothing got actually fixed (protagonists in CC):
>> https://www.postgresql.org/message-id/CABUevEyeZfUvaYMuNop3NyRvvRh2Up2tStK8SXVAPDERf8p9eg@mail.gmail.com
> 
> To answer Magnus' question in that thread, the Mingw headers on jacana
> declare the function with WINBASEAPI which in turn is defined as
> DECLSPEC_IMPORT, as long as _KERNEL32_ isn't defined, and we don't do
> that (and I don't think anything else does either).
> 
> So the fix Peter proposed looks like it should be correct.

I'm not sure exactly what the upstream of mingw is these days, but I
think the original issue that led to 811be893 has long been fixed [0],
and the other stuff in mingwcompat.c is also no longer relevant [1].  I
think mingwcompat.c could be removed altogether.  I'm not sure to what
extent we need to support 5+ year old mingw versions.

[0]:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/9d937a7f4f766f903c9433044f77bfa97a0bc1d8/
[1]:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/88ab6fbdd0a185702a1fce4db935e303030e082f/

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Alvaro Herrera from 2ndQuadrant
Дата:
Сообщение: Re: amcheck verification for GiST
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: amcheck verification for GiST