Re: Centralised architecture detection - Mailing list pgsql-hackers

From Greg Burd
Subject Re: Centralised architecture detection
Date
Msg-id f8b89c60-e5e3-47c0-b63e-eceaf6a9f83e@app.fastmail.com
Whole thread
List pgsql-hackers
On Tue, Jun 30, 2026, at 9:11 PM, Tom Lane wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
>> It looks like they didn't want __riscv32 and __riscv64?
>> https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/E8EO-Fd4t3s
>
> Sigh ... another project that is convinced that they're smarter than
> everybody else and conforming to common practice is an anti-pattern.
>
> Based on that thread, I'm thinking
>
> ...
> #elif defined(__riscv)
> #if SIZEOF_VOID_P == 8
> #define __riscv64__ 1
> #else
> #define __riscv__ 1
> #endif
> #elif defined(__s390__)
> ...

I don't see SIZEOF_VOID_P but I do find:

#define __SIZEOF_POINTER__ 8

-greg

> I'd rather rely on our own pointer-size determination than YA
> magic compiler-defined symbol.
>
>             regards, tom lane



pgsql-hackers by date:

Previous
From: solai v
Date:
Subject: Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement
Next
From: Peter Eisentraut
Date:
Subject: Re: Fix mismatched deallocation functions