Skip site navigation (1) Skip section navigation (2)

narwhal versus gnu_printf

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: narwhal versus gnu_printf
Date: 2012-03-31 15:01:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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
#define PG_PRINTF_ATTRIBUTE printf

			regards, tom lane


pgsql-hackers by date

Next:From: Tom LaneDate: 2012-03-31 15:21:30
Subject: Re: Tab completion of double quoted identifiers broken
Previous:From: Tom LaneDate: 2012-03-31 14:56:36
Subject: pgsql: Add PGDLLIMPORT to ScanKeywords and NumScanKeywords.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group