File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
libc/include/llvm-libc-types Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 99#ifndef LLVM_LIBC_INCLUDE_LLVM_LIBC_TYPES_ERRNO_T_H
1010#define LLVM_LIBC_INCLUDE_LLVM_LIBC_TYPES_ERRNO_T_H
1111
12- // LIBC_HAS_ANNEX_K is a necessary check guard here because errno_t is only
13- // defined when Annex K is enabled. We use LIBC_HAS_ANNEX_K internally to
14- // indicate whether Annex K is enabled or not.
12+ // LIBC_HAS_ANNEX_K is used to check whether C11 Annex K (the optional
13+ // “Bounds-checking interfaces”) is enabled in this libc implementation. Annex K
14+ // introduces additional types and functions, including `errno_t` (a typedef
15+ // used by the *_s functions). Since `errno_t` is *not defined* in the standard
16+ // library unless Annex K is enabled, we must guard any code that uses it with
17+ // LIBC_HAS_ANNEX_K.
1518#ifdef LIBC_HAS_ANNEX_K
1619
1720typedef int errno_t ;
You can’t perform that action at this time.
0 commit comments