Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKkGB-0005bm-6H for pgsql-committers@arkaria.postgresql.org; Sun, 07 Aug 2022 17:40:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oKkG9-00008B-JB for pgsql-committers@arkaria.postgresql.org; Sun, 07 Aug 2022 17:40:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKkG9-000082-Br for pgsql-committers@lists.postgresql.org; Sun, 07 Aug 2022 17:40:17 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKkG2-0002bH-5u for pgsql-committers@lists.postgresql.org; Sun, 07 Aug 2022 17:40:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 70E17320047A; Sun, 7 Aug 2022 13:40:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 07 Aug 2022 13:40:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1659894004; x=1659980404; bh=6 dE2B7Aplmfj9sOxLmTJbLhSpgQYbFRlbhTJghY8VYk=; b=RcMsKmGNZaDxXhyyi dbMdK26a+jsrMM3iEveDnDdlFUPxkQTukSNYp3ZE1/RQ7hm/mNehvmYtAM2YsbS8 lX11pIWDICvOtk38vNli4nQiXleJWuH2s3i7h2IYaxpJPS0G9OlIDdnALrLLtkTA 6DBCi4nfwkBPCIZ0F9SGfEaGL/H1V/WTi//lcxzODkui2+8U28jquCQYzZpWrmNa AbEWIqgwz/ImpGY16oZbMN5Cmp/bgn8OeSnIO4RlHHQrRkF0Lj1j/RjY//2VsF8d PVKW1iMal8e1y/bfTa7je/ZIXLqZsG+Iw6DASWphN9+HMVp8PEt/kZhIzHaamGjm B7rWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdefiedguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehmkeerredttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpeduleekkefgtddttedtkefguddvieffleetgeejiefh teehkeevfeettdduvdfhueenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Aug 2022 13:40:04 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BBF67373; Sun, 7 Aug 2022 19:40:14 +0200 (CEST) Date: Sun, 7 Aug 2022 19:40:14 +0200 From: Alvaro Herrera To: Andres Freund Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Rely on __func__ being supported Message-ID: <20220807174014.xuz7i47oi3ovgwgd@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="p2najo7ttfzo2fgv" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --p2najo7ttfzo2fgv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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/ --p2najo7ttfzo2fgv Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="backw.patch" 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 --p2najo7ttfzo2fgv--