[libc-commits] [libc] [libc][stdio] Add fopen_s and bootstrap annex k. (PR #152248)
Aaron Ballman via libc-commits
libc-commits at lists.llvm.org
Fri Aug 8 06:20:53 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
----------------
AaronBallman wrote:
Do we want the check for `__STDC_VERSION__`? I'm thinking about the case where someone in C++ is setting the `__STDC_WANT_LIB_EXT1__` macro before including a C standard library header; that should still work for them, right?
(https://eel.is/c++draft/library#headers-10 relates)
https://github.com/llvm/llvm-project/pull/152248
More information about the libc-commits
mailing list