[libcxx-commits] [libcxx] [libc++] Mark xopen_source test unsupported on OpenBSD (PR #233710)

Brad Smith via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 20 03:34:53 PDT 2026


https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/233710

>From 5f0dc4b2fe353570324b4a5421063a9c6c133d12 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Tue, 20 Oct 2026 01:59:35 -0400
Subject: [PATCH] [libc++] Mark xopen_source test unsupported on OpenBSD

OpenBSD's headers strictly honor _XOPEN_SOURCE. With 500 and 600 the
POSIX.1-2008 locale API (locale_t, uselocale(), LC_*_MASK) is hidden,
and with any value below 800 asprintf() is hidden since it is only
exposed for POSIX.1-2024 or the BSD namespace. libc++'s OpenBSD locale
support relies on these from public headers, so every generated test
fails.

Mark the test unsupported on OpenBSD targets, as is already done for
FreeBSD.
---
 libcxx/test/extensions/posix/xopen_source.gen.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libcxx/test/extensions/posix/xopen_source.gen.py b/libcxx/test/extensions/posix/xopen_source.gen.py
index bd14e691de5af1..fc75215c6ca13e 100644
--- a/libcxx/test/extensions/posix/xopen_source.gen.py
+++ b/libcxx/test/extensions/posix/xopen_source.gen.py
@@ -17,6 +17,12 @@
 # additions to provide a conforming library at all.
 # UNSUPPORTED: freebsd
 
+# OpenBSD's <sys/cdefs.h> honors _XOPEN_SOURCE strictly: 500 and 600 hide the POSIX.1-2008
+# locale API (locale_t, uselocale(), LC_*_MASK), and every value below 800 hides asprintf(),
+# which is only exposed for POSIX.1-2024 or __BSD_VISIBLE. libc++'s locale support needs all
+# of these from its public headers (e.g. money_put uses __locale::__asprintf).
+# UNSUPPORTED: target={{.+}}-openbsd{{.*}}
+
 # RUN: %{python} %s %{libcxx-dir}/utils
 # END.
 



More information about the libcxx-commits mailing list