Re: Complier warnings on mingw gcc 4.5.0 - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: Complier warnings on mingw gcc 4.5.0
Date
Msg-id AANLkTinvNUU3PHfLWiQOGVFAKbbABLA6e=xmJjcnpWpM@mail.gmail.com
Whole thread Raw
In response to Complier warnings on mingw gcc 4.5.0  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
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 */
#definePGDLLIMPORT
 
--- 61,67 ---- #ifdef _MSC_VER #define PGDLLEXPORT __declspec (dllexport) #else
! #define PGDLLEXPORT #endif #else                         /* not CYGWIN, not MSVC, not MingW */ #define PGDLLIMPORT

-- 
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [GENERAL] Removing pgsql_tmp files
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Removing pgsql_tmp files