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 1rxNQB-0085qv-9g for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 08:47:07 +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 1rxNQ8-002L7U-SV for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 08:47:04 +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 1rxNQ8-002L7M-J9 for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 08:47:04 +0000 Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxNQ6-003QYo-5P for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 08:47:03 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.west.internal (Postfix) with ESMTP id 0449C18000F4; Thu, 18 Apr 2024 04:46:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 18 Apr 2024 04:47:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1713430019; x=1713516419; bh=5sLyVNCgnJMJ0QZEJUu59EdUH9cxP4Q6 QhF3GkcAIGI=; b=ssdl/05PUeMehc9ch23YVNfVmyhWo3WLIDBik7VM+xqjD0Ot /wjZq8nc26CLtQ9Gm7vfP1nLOtzzRAj8jHpMYYk+PccQWj1rxei1BSjRlQrPsyTv QzMNiw3VseMWaDSsow8NRCC/jIyg433jiDXKv+YALMj9Rk4E355AdA5fNIZG1Quz ujmQ6i7NOjref6sd0iZO83df/xuAGs17mrDSvC5XVN1EknLOosWivphuf/khF/s8 DKT06LaGHM7Ws5R2BZtV7H70j7VPviNv2SGhKBUDB/IW7sfdBtdqVWYSvCeT/ozu yn/IOfHOhMopwyHV6ivHOG5pWXtDlZ2YJq2qKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1713430019; x= 1713516419; bh=5sLyVNCgnJMJ0QZEJUu59EdUH9cxP4Q6QhF3GkcAIGI=; b=A YNgCUquPWX5Hw9s0hkFfrAejB19o352EOREtxcbjvv4doQEHp4412dc13p3iQZeM tYtjMVlq0+r/Bo6sm06Lq9IsSot0P9lxJ4NuCzD4gWvzPxF3osSnKAiChSX6SLOj sHtO2G0t0JnnN/j4rd/JWlGGq0sO5Via1YA5X06ksM8Sk1ludbeR5y3TW9wndj8P QtEzIV3HKymFjnvvIk4nfdBnZt+jjD42Y/haY1vupKfTbY4WO35YxWw1xt2FhWFE OAP/pkKa+FNCTq8OnUKY1oeNv+5a0cuiNQ0y4+d/YkiqoJ+fWS0Jv4NG6eRuKjYm whH8JfQMXzKeLNz4FysRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudektddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepjefhveehtdetgfffhffhfeefgffghffflefgieeuueek hedvhedvfeehffdvfeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Apr 2024 04:46:58 -0400 (EDT) Message-ID: <7cf1dcb7-306f-4418-bf25-bdc75130db10@eisentraut.org> Date: Thu, 18 Apr 2024 10:46:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cannot find a working 64-bit integer type on Illumos To: Thomas Munro , Tom Lane Cc: Japin Li , Andres Freund , PostgreSQL Hackers References: <20240322165305.6zrtxcmzdrywvmsu@awork3.anarazel.de> <944094.1711128356@sss.pgh.pa.us> <1229869.1711160593@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut 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.24 02:31, Thomas Munro wrote: > On Sat, Mar 23, 2024 at 3:23 PM Tom Lane wrote: >> Thomas Munro writes: >>> . o O ( int64_t, PRIdi64, etc were standardised a quarter of a century ago ) >> >> Yeah. Now that we require C99 it's probably reasonable to assume >> that those things exist. I wouldn't be in favor of ripping out our >> existing notations like UINT64CONST, because the code churn would be >> substantial and the gain minimal. But we could imagine reimplementing >> that stuff atop and then getting rid of the configure-time >> probes. > > I played around with this a bit, but am not quite there yet. Looks promising. > printf() is a little tricky. The standard wants us to use > 's PRId64 etc, but that might confuse our snprintf.c (in > theory, probably not in practice). "ll" should have the right size on > all systems, but gets warnings from the printf format string checker > on systems where "l" is the right type. 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"? > For limits, why do we have this: > > - * stdint.h limits aren't guaranteed to have compatible types with our fixed > - * width types. So just define our own. > > ? I mean, how could they not have compatible types? Maybe this means something like our int64 is long long int but the system's int64_t is long int underneath, but I don't see how that would matter for the limit macros. > I noticed that configure.ac checks if int64 (no "_t") might be defined > already by system header pollution, but meson.build doesn't. That's > an inconsistency that should be fixed, but which way? Hmm, commit > 15abc7788e6 said that was done for BeOS, which we de-supported. So > maybe we should get rid of that? I had a vague recollection that it was for AIX, but the commit indeed mentions BeOS. Could be removed in either case.