From 5c3661fda947c1bc5e597be081c355b51c595794 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 22 Mar 2015 14:47:29 +0100 Subject: libc: Fix vfprintf compilation without HAS_FLOATS Signed-off-by: Bernhard Reutner-Fischer --- libc/stdio/_fpmaxtostr.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'libc/stdio/_fpmaxtostr.h') diff --git a/libc/stdio/_fpmaxtostr.h b/libc/stdio/_fpmaxtostr.h index b4e7321c2..7694629ec 100644 --- a/libc/stdio/_fpmaxtostr.h +++ b/libc/stdio/_fpmaxtostr.h @@ -11,39 +11,39 @@ #define _FPMAXTOSTR_H 1 #include -#ifdef __UCLIBC_HAS_FLOATS__ - #define __need_size_t #include #include #include #include #include -#include -#include + +#ifdef __UCLIBC_HAS_FLOATS__ +# include +# include /* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */ /* With 32 bit ints, we can get 9 decimal digits per block. */ -#define DIGITS_PER_BLOCK 9 +# define DIGITS_PER_BLOCK 9 -#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK) +# define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK) /* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */ /* extra space for '-', '.', 'e+###', and nul */ -#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK ) +# define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK ) /* psm: why do these internals differ? */ -#ifdef __USE_OLD_VFPRINTF__ +# 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 +# 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; -#endif +# endif -#endif /* __UCLIBC_HAS_FLOATS__ */ +# endif /* __UCLIBC_HAS_FLOATS__ */ #endif /* _FPMAXTOSTR_H */ -- cgit v1.2.3