diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-01-13 09:13:57 +0000 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-01-13 09:13:57 +0000 |
commit | 29d84e5a46254dc453771d327f6e4d664660e239 (patch) | |
tree | bc3c50b3bdda1dbc26388a7c8fca01404ba6d8a9 /newlib/libc/stdio/vfprintf.c | |
parent | b2af74282ba3fbadc0847d6d8aac12f68557f0de (diff) | |
download | cygnal-29d84e5a46254dc453771d327f6e4d664660e239.tar.gz cygnal-29d84e5a46254dc453771d327f6e4d664660e239.tar.bz2 cygnal-29d84e5a46254dc453771d327f6e4d664660e239.zip |
* libc/stdio/sprintf.c: Document 'm' conversion specifier.
* libc/stdio/swprintf.c: Ditto.
* libc/stdio/vfprintf.c (_VFPRINTF_R) [_GLIBC_EXTENSION]: Handle 'm'
conversion specifier.
* libc/stdio/vfwprintf.c (_VFWPRINTF_R) [_GLIBC_EXTENSION]: Ditto.
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index be35d248c..e3fc099d3 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -1225,6 +1225,15 @@ reswitch: switch (ch) { sign = '-'; break; #endif /* FLOATING_POINT */ +#ifdef _GLIBC_EXTENSION + case 'm': /* extension */ + { + int dummy; + cp = _strerror_r (data, data->_errno, 1, &dummy); + } + flags &= ~LONGINT; + goto string; +#endif case 'n': #ifndef _NO_LONGLONG if (flags & QUADINT) @@ -1272,8 +1281,11 @@ reswitch: switch (ch) { #ifdef _WANT_IO_C99_FORMATS case 'S': #endif - sign = '\0'; cp = GET_ARG (N, ap, char_ptr_t); +#ifdef _GLIBC_EXTENSION +string: +#endif + sign = '\0'; #ifndef __OPTIMIZE_SIZE__ /* Behavior is undefined if the user passed a NULL string when precision is not 0. |