Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOdez-000Mga-6u for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 13:35:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sOdex-0022oF-79 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 13:35:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOdew-0022o4-TK for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2024 13:35:03 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOdeu-0002d9-U9 for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2024 13:35:02 +0000 Received: from [192.168.1.115] (dsl-hkibng22-54f8db-125.dhcp.inet.fi [84.248.219.125]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4WD3mx72GSzyVY; Tue, 2 Jul 2024 16:34:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1719927298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PgZF93MKOyaEpwvycLaMLyAEqA1fstUNB0PGEIciJ3M=; b=sdrJUCH4TLiMcaOlTG0PnzBL6uu2/KnGOAdYg8D6T+DWOxehYrPgIXeqcBX/T8uhYLvPTJ GSjG1+FG/cwSTiXXB7XnZM7KKu8gS/WAp3kEtmL8NsEY7TMOLPvkHttvnlBPA4AfSGmRD8 em8MgiqGOIhDA1o5Uqa1mPXb5BL2iuc= ARC-Seal: i=1; s=meesny; d=iki.fi; t=1719927298; a=rsa-sha256; cv=none; b=As7piNz2aVLWt5StLbjP2ONq8vSwNuodQh/8G55U/hBMI+/hrqvZGLMwyGyFjYgM9f/DBq bO/L6YttzyJRV7Ub0e24AE+mH4gpfcUdT/d5MyuJk7NqE1r3ev/p/IvDAXuGzq2tz13Wze Cqfxblow7ghh+rhiiak8qwPyNEhe/Dc= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1719927298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PgZF93MKOyaEpwvycLaMLyAEqA1fstUNB0PGEIciJ3M=; b=BUWbPgHy6GdXEU3ZA8ynCA3ro6gKT5RRbplRUiVVsGc5jqX1fCKRF635nI1YE9ya+mNUuL 9OWBoweWOIrTHonNcaz0BcGDbNzKtYGPw5A0bMQpV4c3ggXAdYHFHDyi2t/LjhVnjIgG+K pTOiaEwN8DPYUAmdj1Jtb7Pt8q1SfiQ= Message-ID: Date: Tue, 2 Jul 2024 16:34:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cannot find a working 64-bit integer type on Illumos To: Thomas Munro , Peter Eisentraut Cc: Tom Lane , Japin Li , Andres Freund , PostgreSQL Hackers References: <20240322165305.6zrtxcmzdrywvmsu@awork3.anarazel.de> <944094.1711128356@sss.pgh.pa.us> <1229869.1711160593@sss.pgh.pa.us> <7cf1dcb7-306f-4418-bf25-bdc75130db10@eisentraut.org> Content-Language: en-US From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18/04/2024 23:29, Thomas Munro wrote: > On Thu, Apr 18, 2024 at 8:47 PM Peter Eisentraut wrote: >> I'm not sure I understand the problem here. Do you mean that in theory >> a platform's PRId64 could be something other than "l" or "ll"? > > Yes. I don't know why anyone would do that, and the systems I checked > all have the obvious definitions, eg "ld", "lld" etc. Perhaps it's an > acceptable risk? It certainly gives us a tidier result. Could we have a configure check or static assertion for that? > For discussion, here is a variant that fully embraces and > the PRI*64 macros. Looks good to me. Personally, I find "PRId64" pretty unreadable. "INT64_MODIFIER" wasn't nice either, though, and following standards is good, so I'm sure I'll get used to it. They're both less readable than INT64_FORMAT and "%lld", which we use in most places, though. Perhaps "%lld" and casting the arguments to "long long" would be more readable in the places where this patch replaces INT64_MODIFIER with PRI*64, too. -- Heikki Linnakangas Neon (https://neon.tech)