[libc-commits] [libc] [libc][annex_k] Add errno_t. (PR #163094)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Oct 16 15:37:25 PDT 2025


================
@@ -0,0 +1,21 @@
+//===-- Definition of type errno_t ----------------------------------------===//
+//
+// 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_TYPES_ERRNO_T_H
+#define LLVM_LIBC_INCLUDE_LLVM_LIBC_TYPES_ERRNO_T_H
+
+// LIBC_HAS_ANNEX_K is a necessary check guard here because errno_t is only
+// defined when Annex K is enabled. We use LIBC_HAS_ANNEX_K internally to
+// indicate whether Annex K is enabled or not.
----------------
michaelrj-google wrote:

this comment is not a useful explanation. It says that `errno_t` is only defined when Annex K is enabled but doesn't provide a reason why.

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


More information about the libc-commits mailing list