pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Rely on __func__ being supported
Date: Sun, 7 Aug 2022 19:40:14 +0200
Message-ID: <20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql> (raw)
In-Reply-To: <E1oKjGa-000kX6-3d@gemulon.postgresql.org>

On 2022-Aug-07, Andres Freund wrote:

> Rely on __func__ being supported
> 
> Previously we fell back to __FUNCTION__ and then NULL. As __func__ is in C99
> that shouldn't be necessary anymore.
> 
> Solution.pm defined HAVE_FUNCNAME__FUNCTION instead of
> HAVE_FUNCNAME__FUNC (originating in 4164e6636e2), as at some point in the past
> MSVC only supported __FUNCTION__. Our minimum version supports __func__.

I'd rather we keep PG_FUNCNAME_MACRO defined to __func__ ... it costs us
nothing.  Would anybody oppose that?

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/

Attachments:

backw.patch (text/x-diff, 411B) download diff --git a/src/include/c.h b/src/include/c.h index de9ec04d49..d21cd71f0b 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -360,6 +360,8 @@ typedef void (*pg_funcptr_t) (void); */ #define FLEXIBLE_ARRAY_MEMBER /* empty */ +/* For backwards compatibility */ +#define PG_FUNCNAME_MACRO __func__ /* ---------------------------------------------------------------- * Section 2: bool, true, false

view thread (4+ messages)  latest in thread

Message-ID: <20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql>
Permalink:  ../20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql/
Also on:    postgresql.org/message-id/20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, andres@anarazel.de
  Subject: Re: pgsql: Rely on __func__ being supported
  In-Reply-To: <20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql>
  References: <E1oKjGa-000kX6-3d@gemulon.postgresql.org> <20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox