X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fvfprintf.c;h=a2b287bd17c5dcce66821d2a8af55cbbf7a5623a;hb=f29fea00b5bc72d4b8abccba2bb1e312684d1fce;hp=4a2752b275834d76786bc6af95b238f92831e37b;hpb=776251867d07cca2866908186ef245f72596ce75;p=musl diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 4a2752b2..a2b287bd 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -1,4 +1,13 @@ #include "stdio_impl.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Some useful macros */ @@ -189,6 +198,13 @@ static char *fmt_u(uintmax_t x, char *s) return s; } +/* Do not override this check. The floating point printing code below + * depends on the float.h constants being right. If they are wrong, it + * may overflow the stack. */ +#if LDBL_MANT_DIG == 53 +typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double)]; +#endif + static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) { uint32_t big[(LDBL_MAX_EXP+LDBL_MANT_DIG)/9+1];