v2-0002-Enable-Visual-Studio-s-stdatomic.h-support.patch

application/octet-stream

Filename: v2-0002-Enable-Visual-Studio-s-stdatomic.h-support.patch
Type: application/octet-stream
Part: 1
Message: Re: Trying out <stdatomic.h>

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v2-0002
Subject: Enable Visual Studio's <stdatomic.h> support.
File+
meson.build 4 0
From 58f088ee11236b3b5b20f2b6ffd97d17181f2afc Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Thu, 13 Nov 2025 10:48:14 +1300
Subject: [PATCH v2 2/5] Enable Visual Studio's <stdatomic.h> support.

XXX It's still marked as 'experimental' as of the compiler in CI.
---
 meson.build | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meson.build b/meson.build
index c1e17aa3040..04c563378c7 100644
--- a/meson.build
+++ b/meson.build
@@ -580,6 +580,10 @@ if not cc.compiles(c11_test, name: 'C11')
   endif
 endif
 
+# XXX Should test whether <stdatomic.h> works without this
+if cc.get_id() == 'msvc'
+  cflags += '/experimental:c11atomics'
+endif
 
 postgres_inc = [include_directories(postgres_inc_d)]
 test_lib_d = postgres_lib_d
-- 
2.50.1 (Apple Git-155)