Re: Centralised architecture detection

From: "Greg Burd" <greg(at)burd(dot)me>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Lukas Fittl" <lukas(at)fittl(dot)com>
Subject: Re: Centralised architecture detection
Date: 2026-07-03 15:28:50
Message-ID: 0250214e-23c7-4d4f-9ea2-9eca3076ff15@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Wed, Jul 1, 2026, at 9:20 AM, Tom Lane wrote:
> "Greg Burd" <greg(at)burd(dot)me> writes:
>> On Tue, Jun 30, 2026, at 9:11 PM, Tom Lane wrote:
>>> Based on that thread, I'm thinking
>>> #if SIZEOF_VOID_P == 8
>
>> I don't see SIZEOF_VOID_P but I do find:
>> #define __SIZEOF_POINTER__ 8
>
> SIZEOF_VOID_P is set up by autoconf/meson via pg_config.h.

facepalm, of course! :)

> So it will be available here. I'd rather use our own
> symbol because, if other arches emerge with similar issues,
> we can be sure of having a common pattern to follow.
>
> I do see __SIZEOF_POINTER__ getting predefined locally
> (in recent gcc and clang on x86_64), but it's far from clear
> to me how standard, or well-documented, that macro is.
>
> regards, tom lane

Was there anything else you needed from me on this one?

best.

-greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2026-07-03 15:35:35 Remove getpgusername()
Previous Message Peter Eisentraut 2026-07-03 15:17:40 Re: [PATCH] Resolve unknown-type literals in GRAPH_TABLE COLUMNS