Re: narwhal and PGDLLIMPORT

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hiroshi Inoue <inoue@tpf.co.jp>, Craig Ringer <craig@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Andrew Dunstan <andrew@dunslane.net>, Andres Freund <andres@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2014-02-09T05:55:18Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. MinGW: Link with shell32.dll instead of shfolder.dll.

  2. Centralize getopt-related declarations in a new header file pg_getopt.h.

  3. Get rid of use of dlltool in Mingw builds.

  4. Export a few more symbols required for test_shm_mq module.

  5. Export set_latch_on_sigusr1 symbol for Windows.

  6. Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the

Attachments

On Sun, Feb 9, 2014 at 4:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Hiroshi Inoue <inoue@tpf.co.jp> writes:
>> Though I'm not a MINGW expert at all, I know dllwrap is a deprecated
>> tool and dlltool is almost a deprecated tool. Cygwin port is removing
>> the use of dllwrap and dlltool now. Isn't it better for MINGW port to
>> follow it?
>
> Only way to make that happen is to prepare and test a patch ...
>
> In the meantime, here's a short patch trying the "#define extern" approach.
> Anyone want to try this on a Windows machine or two?

There are quite a few warnings and errors in build:
Most prominent are:
1>  reloptions.c
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\math.h(88): warning C4141: 'dllexport' : used more
than once
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\math.h(460): warning C4141: 'dllexport' : used more
than once
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\float.h(180): warning C4141: 'dllexport' : used more
than once
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\math.h(88): warning C4141: 'dllexport' : used more
than once
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\math.h(460): warning C4141: 'dllexport' : used more
than once
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\float.h(180): warning C4141: 'dllexport' : used more
than once

There are few others as well:

1>src\backend\utils\misc\guc-file.c(736): error C2375: 'GUC_yylex' :
redefinition; different linkage
1>          src\backend\utils\misc\guc-file.l(49) : see declaration of
'GUC_yylex'

1>c:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\include\winioctl.h(39): error C2370:
'GUID_DEVINTERFACE_DISK' : redefinition; different storage class
1>          c:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\include\winioctl.h(39) : see declaration of
'GUID_DEVINTERFACE_DISK'


Attached find the build output of postgres.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com