diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-02 15:31:00 +0100 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-03 18:22:50 +0100 |
commit | 8116ca7baec0ff8c9bc35a2920aa36549e6004a4 (patch) | |
tree | 40d62da621d8ad147a1594d82cd9100d6811e0ee | |
parent | 83c1854b97d79e2b67065b1a2651b0d11d8a8f6b (diff) |
make parse_printf_format() depend on UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
we already remove the printf.h header if this option is disabled
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
-rw-r--r-- | extra/Configs/Config.in | 1 | ||||
-rw-r--r-- | libc/stdio/_vfprintf.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index 15da168d5..4d2c870bd 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -1499,6 +1499,7 @@ config UCLIBC_HAS_GLIBC_CUSTOM_PRINTF help Answer Y to support glibc's register_printf_function() to allow an application to add its own printf conversion specifiers. + parse_printf_format() is also enabled. NOTE: Limits the number or registered specifiers to 10. NOTE: Requires new conversion specifiers to be ASCII diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c index fa5dc44fc..3db8cdf67 100644 --- a/libc/stdio/_vfprintf.c +++ b/libc/stdio/_vfprintf.c @@ -417,6 +417,8 @@ extern uintmax_t _load_inttype(int desttype, const void *src, int uflag) attribu /**********************************************************************/ #ifdef L_parse_printf_format +#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__ + /* NOTE: This function differs from the glibc version in that parsing stops * upon encountering an invalid conversion specifier. Since this is the way * my printf functions work, I think it makes sense to do it that way here. @@ -485,6 +487,8 @@ size_t parse_printf_format(register const char *template, } #endif + +#endif /**********************************************************************/ #ifdef L__ppfs_init |