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/cabueveyezfuvaymunop3nyrvvrh2up2tstk8sxvapderf8p...@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


Reply via email to