Re: narwhal versus gnu_printf

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: narwhal versus gnu_printf
Date: 2012-03-31 15:42:47
Message-ID: 4F7725F7.4050807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/31/2012 11:01 AM, Tom Lane wrote:
> I noticed that the build logs for buildfarm member narwhal (a mingw
> critter) contain an awful lot of occurrences of
>
> ../../src/include/utils/elog.h:159: warning: `gnu_printf' is an unrecognized format function type
>
> Evidently, the following hunk in pg_config_manual.h failed to consider
> mingw. Is there a simple fix?
>
> /*
> * Set the format style used by gcc to check printf type functions. We really
> * want the "gnu_printf" style set, which includes what glibc uses, such
> * as %m for error strings and %lld for 64 bit long longs. But not all gcc
> * compilers are known to support it, so we just use "printf" which all
> * gcc versions alive are known to support, except on Windows where
> * using "gnu_printf" style makes a dramatic difference. Maybe someday
> * we'll have a configure test for this, if we ever discover use of more
> * variants to be necessary.
> */
> #ifdef WIN32
> #define PG_PRINTF_ATTRIBUTE gnu_printf
> #else
> #define PG_PRINTF_ATTRIBUTE printf
> #endif

No, we did consider mingw - very much so since this attribute isn't used
under MSVC.

Narwhal is using an ancient version of gcc, however. Compare this to
frogmouth which has no such warnings. (I know frogmouth hasn't been
reporting for 13 days - I'm fixing that)

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-31 15:50:27 Re: Speed dblink using alternate libpq tuple storage
Previous Message Andrew Dunstan 2012-03-31 15:41:01 Re: pgsql: Add PGDLLIMPORT to ScanKeywords and NumScanKeywords.