Re: Fix typo 586/686 in atomics/arch-x86.h - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Fix typo 586/686 in atomics/arch-x86.h
Date
Msg-id 7D3A6A2C-EA71-4E47-83F0-3A4E6C6DEF7B@yesql.se
Whole thread
In response to Re: Fix typo 586/686 in atomics/arch-x86.h  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Fix typo 586/686 in atomics/arch-x86.h
List pgsql-hackers
> On 7 May 2026, at 23:46, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Thu, May 07, 2026 at 04:44:45PM -0500, Nathan Bossart wrote:
>> On Thu, May 07, 2026 at 10:59:26PM +0200, Daniel Gustafsson wrote:
>>> Attached is a patch against HEAD for this.  Reading your mail my interpretation
>>> was that this was equally broken for MSVC even though the macro is correct
>>> there, and we should remove both.  Was that a correct reading?
>>
>> Yeah, atomics.h doesn't use the right macro for MSVC, so nothing in this
>> file is compiled for MSVC anyway.  However, I suspect the proper fix is to
>> make sure this file is included for MSVC.  Note that the other MSVC code in
>> this file is similarly broken, but fortunately isn't used anywhere [0].
>
> To be clear, I'm +1 on removing any 32-bit code in this file.  But the
> 64-bit stuff should probably be fixed.

Agreed.  Reading over the threads you linked it seems the way forward is to
apply the patch posted here, and then fix arch detection so that atomics.h
picks up the right code for x86-64.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: PostgreSQL and OpenSSL 4.0.0
Next
From: Richard Guo
Date:
Subject: Re: Fix HAVING-to-WHERE pushdown with nondeterministic collations