diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2002-06-18 08:41:28 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2002-06-18 08:41:28 +0000 |
commit | 5b0c2c6d870cc9f9f2eae32f4d71abc6f9348e20 (patch) | |
tree | 60d5b9ee265a8d359484c6dbb3d25da6f209718e /libc/stdio/printf.c | |
parent | 6f1e6c22ab67fbb7b5642e142ac3c1f4d6968263 (diff) |
Fix perror() and printf("%m") to not call strerror(), as required by the
standards. Temporarily added a utility function to wrap Erik's strerror_r
so that "Unknown error xxx" strings can be generated for errno's which
cause strerror_r to fail. That utility function will eventually be merged
in with the strerror/strerror_r functions when I change over to optionallly
mmap'ing the system error strings to provide for lower mem comsumption on
non-MMU platforms, as well as locale-specific system error messages.
Diffstat (limited to 'libc/stdio/printf.c')
-rw-r--r-- | libc/stdio/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index 92b5b5956..2fac4c93f 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -1207,7 +1207,7 @@ int _do_one_spec(FILE * __restrict stream, register ppfs_t *ppfs, int *count) } #ifdef __STDIO_PRINTF_M_SUPPORT } else if (ppfs->conv_num == CONV_m) { - s = strerror(errno); + s = _stdio_strerror_r(errno, buf, sizeof(buf)); goto SET_STRING_LEN; #endif } else { |