[git commit] old_vfprintf.c: use _fpmaxtostr.h
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jun 15 12:00:31 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=6e7b72235b41c1415a03bcb03bad76180eb00644
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
It shows that the internal functions differ...
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
libc/stdio/_fpmaxtostr.h | 10 +++++++++-
libc/stdio/old_vfprintf.c | 15 +--------------
2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/libc/stdio/_fpmaxtostr.h b/libc/stdio/_fpmaxtostr.h
index 5adb931..b4e7321 100644
--- a/libc/stdio/_fpmaxtostr.h
+++ b/libc/stdio/_fpmaxtostr.h
@@ -32,10 +32,18 @@
/* extra space for '-', '.', 'e+###', and nul */
#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
+/* psm: why do these internals differ? */
+#ifdef __USE_OLD_VFPRINTF__
+typedef void (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf);
+
+extern size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
+ __fp_outfunc_t fp_outfunc) attribute_hidden;
+#else
typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf);
extern ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- __fp_outfunc_t fp_outfunc) attribute_hidden;
+ __fp_outfunc_t fp_outfunc) attribute_hidden;
+#endif
#endif /* __UCLIBC_HAS_FLOATS__ */
#endif /* _FPMAXTOSTR_H */
diff --git a/libc/stdio/old_vfprintf.c b/libc/stdio/old_vfprintf.c
index d85bfde..75bf341 100644
--- a/libc/stdio/old_vfprintf.c
+++ b/libc/stdio/old_vfprintf.c
@@ -135,14 +135,9 @@
#include <errno.h>
#include <ctype.h>
#include <bits/uClibc_uintmaxtostr.h>
-#include <printf.h>
-#ifdef __UCLIBC_HAS_THREADS__
-#include <pthread.h>
-#endif /* __UCLIBC_HAS_THREADS__ */
+#include "_fpmaxtostr.h"
-
-/* #undef __UCLIBC_HAS_FLOATS__ */
/* #undef WANT_FLOAT_ERROR */
/* #define WANT_FLOAT_ERROR 1 */
@@ -206,14 +201,6 @@ static void putc_unlocked_sprintf(int c, __FILE_vsnprintf *f)
#endif /* __STDIO_BUFFERS */
#ifdef __UCLIBC_HAS_FLOATS__
-#include <float.h>
-#include <bits/uClibc_fpmax.h>
-
-typedef void (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
- intptr_t buf);
-
-extern size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
- __fp_outfunc_t fp_outfunc) attribute_hidden;
static void _charpad(FILE * __restrict stream, int padchar, size_t numpad)
{
More information about the uClibc-cvs
mailing list