Re: Cannot find a working 64-bit integer type on Illumos

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Cannot find a working 64-bit integer type on Illumos
Date: 2024-04-18 21:22:10
Message-ID: CA+hUKG+5Nkj-aBhfdU55EpCo0Qki8_oP5uSAkjsgKJKxZ+La4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 18, 2024 at 6:09 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
> /home/japin/postgres/build/../src/common/config_info.c:198:11: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
> 198 | Assert(i == *configdata_len);

Right, PostgreSQL doesn't compile cleanly with the "sign-compare"
warning. There have been a few threads about that, and someone might
want to think harder about it, but it's a different topic unrelated to
<stdint.h>.

> /home/japin/postgres/build/../src/include/lib/simplehash.h:1138:9: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64' {aka 'long unsigned int'} [-Werror=format=]

It seems my v1 patch's configure probe for INT64_FORMAT was broken.
In the v2 patch I tried not doing that probe at all, and instead
inviting <inttypes.h> into our world (that's the standardised way to
produce format strings, which has the slight complication that we are
intercepting printf calls...). I suspect that'll work better for you.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirk Wolak 2024-04-18 21:29:14 Re: Idea Feedback: psql \h misses -> Offers Links?
Previous Message Nathan Bossart 2024-04-18 21:19:24 Re: improve performance of pg_dump --binary-upgrade