Re: Complier warnings on mingw gcc 4.5.0

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Complier warnings on mingw gcc 4.5.0
Date: 2010-11-01 21:02:07
Message-ID: 4CCF2ACF.7070901@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2010/11/01 19:24), Itagaki Takahiro wrote:
> I compiled the source with mingw gcc 4.5.0, that has been released recently.
> The compile was succeeded and worked well at least for simple queries,
> but there were many warnings during the compile.
> ----
> 1. warning: '<symbol>' redeclared without dllimport attribute:
> previous dllimport ignored
> 2. warning: unknown conversion type character 'm' in format
> 3. warning: unknown conversion type character 'l' in format
> ----
>
> 1 is easy to fix with the attached patch.

Is it safe to put back the patch you applied in
http://archives.postgresql.org/pgsql-committers/2010-05/msg00338.php
in the case __GNUC__ >=4?

regards,
Hiroshi Inoue

> I wonder why mingw gcc< 4.5 can build codes without the fix...
>

> *** a/src/include/port/win32.h
> --- b/src/include/port/win32.h
> ***************
> *** 58,64 ****
> #define PGDLLIMPORT __declspec (dllimport)
> #endWindows 7 64bit
>
>
> diff --git a/src/include/port/win32.h b/src/include/port/win32.h
> indexif
>
> ! #ifdef _MSC_VER
> #define PGDLLEXPORT __declspec (dllexport)
> #else
> #define PGDLLEXPORT __declspec (dllimport)
> --- 58,64 ----
> #define PGDLLIMPORT __declspec (dllimport)
> #endif
>
> ! #if defined(_MSC_VER) || __GNUC__>= 4
> #define PGDLLEXPORT __declspec (dllexport)
> #else
> #define PGDLLEXPORT __declspec (dllimport)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2010-11-01 21:24:03 Re: why does plperl cache functions using just a bool for is_trigger
Previous Message Jeff Davis 2010-11-01 20:39:14 Re: Range Types, discrete and/or continuous