pgsql: Add definition pg_attribute_aligned() for MSVC

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add definition pg_attribute_aligned() for MSVC
Date: 2022-09-21 01:11:30
Message-ID: E1oaoGv-001H1u-Pi@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add definition pg_attribute_aligned() for MSVC

Visual Studio 2015+ has support for a macro to control the alignement of
structures as of __declspec(align(#)), and this commit adds a definition
of pg_attribute_aligned() based on that. It happens that this was
already used in the implementation of atomics for MSVC. Note that there
is still no definition fo pg_attribute_packed(), so this does not impact
itemptr.h.

Author: James Coleman
Discussion: https://postgr.es/m/CAAaqYe-HbtZvR3msoMtk+hYW2S0e0OapzMW8icSMYTMA+mN8Aw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ec3c9cc202fb2749fce82483e6dc247cfe286cab

Modified Files
--------------
config/c-compiler.m4 | 2 ++
configure | 2 ++
src/include/c.h | 11 +++++++++++
src/include/port/atomics/generic-msvc.h | 2 +-
4 files changed, 16 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-09-21 01:15:04 pgsql: Use \b in one more PG_TEST_EXTRA check, oversight in c3382a3c3cc
Previous Message Andrew Dunstan 2022-09-21 01:03:06 Re: pgsql: Fix createdb tests for C locale