[libc-commits] [libc] [libc] Fix missing default value for errno config (PR #100175)
via libc-commits
libc-commits at lists.llvm.org
Tue Jul 23 12:58:39 PDT 2024
================
@@ -23,15 +25,17 @@
// fullbuild mode, effectively the same as `LIBC_ERRNO_MODE_EXTERNAL`.
#define LIBC_ERRNO_MODE_SYSTEM 5
-#ifndef LIBC_ERRNO_MODE
+#if !defined(LIBC_ERRNO_MODE) || LIBC_ERRNO_MODE == LIBC_ERRNO_MODE_DEFAULT
+#undef LIBC_ERRNO_MODE
#if defined(LIBC_FULL_BUILD) || !defined(LIBC_COPT_PUBLIC_PACKAGING)
#define LIBC_ERRNO_MODE LIBC_ERRNO_MODE_THREAD_LOCAL
#else
#define LIBC_ERRNO_MODE LIBC_ERRNO_MODE_SYSTEM
#endif
#endif // LIBC_ERRNO_MODE
-#if LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_UNDEFINED && \
+#if LIBC_ERRNO_MODE != LIBC_ERRNO_MODE_DEFAULT && \
----------------
lntue wrote:
add `LIBC_ERRNO_MODE_DEFAULT` to L44 below.
https://github.com/llvm/llvm-project/pull/100175
More information about the libc-commits
mailing list