[libc-commits] [libc] [libc][stdio] Add fopen_s and bootstrap annex k. (PR #152248)

Muhammad Bassiouni via libc-commits libc-commits at lists.llvm.org
Fri Aug 8 10:58:52 PDT 2025


================
@@ -0,0 +1,19 @@
+//===-- Definition of macros to be used with Annex K functions ------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_INCLUDE_LLVM_LIBC_MACROS_ANNEX_K_MACROS_H
+#define LLVM_LIBC_INCLUDE_LLVM_LIBC_MACROS_ANNEX_K_MACROS_H
+
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L &&                \
+    defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ == 1
----------------
bassiounix wrote:

> We could also address that by adding `|| defined(__cplusplus)` though.

Btw is it specified which version of C++ it's available on? like can we say C++03 has access to annex k?

https://github.com/llvm/llvm-project/pull/152248


More information about the libc-commits mailing list