Automatic PG_PRINTF_ATTRIBUTE

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Automatic PG_PRINTF_ATTRIBUTE
Date: 2014-11-21 08:12:14
Message-ID: 20141121081214.GA1002780@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pg_config_manual.h has been choosing gnu_printf as the PG_PRINTF_ATTRIBUTE for
every MinGW build. That invites a torrent of warnings on pre-gcc-4.4 MinGW
compilers, including the compiler on buildfarm member narwhal. I'm
increasingly using an affected compiler, because it builds twice as quickly as
today's gcc. Let's have "configure" detect whether gcc supports gnu_printf
before using it. I gather plain "printf" aliases ms_printf on Windows and
gnu_printf elsewhere. Therefore, while the new "configure" test applies to
all platforms, non-Windows platforms are disinterested in the outcome today.
Suppose gcc introduces aix_printf and has plain "printf" alias it on AIX.
PostgreSQL will continue to replace platform printf implementations that
depart from our format processing expectations, and our own elog.c code
processes errmsg() formats. Therefore, gnu_printf would remain the better
global choice even if new archetypes become available.

Attachment Content-Type Size
gnu_printf-auto-v1.patch text/plain 4.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dag-Erling Smørgrav 2014-11-21 08:15:36 Re: [PATCH] add ssl_protocols configuration option
Previous Message Pavel Golub 2014-11-21 08:07:12 "Closed connection unexpectedly caused by winsock error 10061 on Win2008 R2