Re: Complier warnings on mingw gcc 4.5.0

Itagaki Takahiro <itagaki.takahiro@gmail.com>

From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, inoue@tpf.co.jp
Date: 2010-11-09T02:27:26Z
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. Make the win32 putenv() override update *all* present versions of the

  2. Remove the use of the pg_auth flat file for client authentication.

On Mon, Nov 1, 2010 at 7:24 PM, Itagaki Takahiro
<itagaki.takahiro@gmail.com> wrote:
> 1. warning: '<symbol>' redeclared without dllimport attribute:
> previous dllimport ignored

I discussed with Hiroshi-san about the dllimport issue, and he pointed
out that __declspec(dllexport) and dllwrap cannot work well together.
So, the most suitable fix would be just removing __declspec (dllimport)
from PGDLLEXPORT for mingw.

diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 988c1c9..3417ab5 100644
*** a/src/include/port/win32.h
--- b/src/include/port/win32.h
***************
*** 61,67 ****
  #ifdef _MSC_VER
  #define PGDLLEXPORT __declspec (dllexport)
  #else
! #define PGDLLEXPORT __declspec (dllimport)
  #endif
  #else                         /* not CYGWIN, not MSVC, not MingW */
  #define PGDLLIMPORT
--- 61,67 ----
  #ifdef _MSC_VER
  #define PGDLLEXPORT __declspec (dllexport)
  #else
! #define PGDLLEXPORT
  #endif
  #else                         /* not CYGWIN, not MSVC, not MingW */
  #define PGDLLIMPORT

-- 
Itagaki Takahiro