[libc-commits] [libc] [libc] Add printf error handling (PR #162876)
Marcell Leleszi via libc-commits
libc-commits at lists.llvm.org
Thu Oct 23 04:24:39 PDT 2025
================
@@ -47,9 +49,9 @@ LIBC_INLINE void flockfile(::FILE *f) { ::flockfile(f); }
LIBC_INLINE void funlockfile(::FILE *f) { ::funlockfile(f); }
-LIBC_INLINE size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb,
- ::FILE *f) {
- return ::fwrite_unlocked(ptr, size, nmemb, f);
+LIBC_INLINE FileIOResult fwrite_unlocked(const void *ptr, size_t size,
+ size_t nmemb, ::FILE *f) {
+ return {::fwrite_unlocked(ptr, size, nmemb, f), errno};
----------------
mleleszi wrote:
Ah, so that's why the overlay tests were failing with libc_errno...but if libc_errno is not set in tests, we won't be able to test this case in overlay mode...should I just not check errno in these tests in overlay mode?
https://github.com/llvm/llvm-project/pull/162876
More information about the libc-commits
mailing list