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/
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

Reply via email to