[all-commits] [llvm/llvm-project] f009f7: [libc] Add printf strerror conversion (%m) (#105891)
Michael Jones via All-commits
all-commits at lists.llvm.org
Thu Sep 19 10:48:29 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f009f72df5285acab0ebb600636653d7db72a552
https://github.com/llvm/llvm-project/commit/f009f72df5285acab0ebb600636653d7db72a552
Author: Michael Jones <michaelrj at google.com>
Date: 2024-09-19 (Thu, 19 Sep 2024)
Changed paths:
M libc/config/baremetal/config.json
M libc/config/config.json
M libc/config/gpu/config.json
M libc/docs/configure.rst
M libc/docs/dev/printf_behavior.rst
M libc/src/__support/StringUtil/error_to_string.cpp
M libc/src/__support/StringUtil/error_to_string.h
M libc/src/__support/StringUtil/tables/linux_extension_errors.h
M libc/src/__support/StringUtil/tables/linux_platform_errors.h
M libc/src/__support/StringUtil/tables/minimal_platform_errors.h
M libc/src/__support/StringUtil/tables/posix_errors.h
M libc/src/__support/StringUtil/tables/stdc_errors.h
M libc/src/stdio/printf_core/CMakeLists.txt
M libc/src/stdio/printf_core/converter.cpp
M libc/src/stdio/printf_core/converter_atlas.h
M libc/src/stdio/printf_core/parser.h
A libc/src/stdio/printf_core/strerror_converter.h
M libc/test/src/stdio/CMakeLists.txt
M libc/test/src/stdio/sprintf_test.cpp
M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Log Message:
-----------
[libc] Add printf strerror conversion (%m) (#105891)
This patch adds the %m conversion to printf, which prints the
strerror(errno). Explanation of why is below, this patch also updates
the docs, tests, and build system to accomodate this.
The standard for syslog in posix specifies it uses the same format as
printf, but adds %m which prints the error message string for the
current value of errno. For ease of implementation, it's standard
practice for libc implementers to just add %m to printf instead of
creating a separate parser for syslog.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list