From 829e76551bc1d5489df5fe9192daa0d63c917f07 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 11 Aug 2020 19:52:56 -0400 Subject: pull in newer definitions if building C89/C95 --- src/stdio/__printf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/stdio/__printf.c b/src/stdio/__printf.c index 26197b4a..87d9368b 100644 --- a/src/stdio/__printf.c +++ b/src/stdio/__printf.c @@ -1,4 +1,17 @@ #include "_stdio.h" +#include "stddef.h" +#include "wchar.h" +#include "inttypes.h" +#include "unistd.h" + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199909L +#include "../stdint/intmax_t.c" +#include "../stdint/uintmax_t.c" +#include "../stdint/intptr_t.c" +#include "../stdint/UINTMAX_MAX.c" +#define strtoumax __strtoumax +#include "../inttypes/strtoumax.c" +#endif #define NUMBUFLEN 64 @@ -311,3 +324,7 @@ int (__printf)(struct io_options *opt, const char * format, va_list arg) return nout; } + +/* +STDC(0) +*/ -- cgit v1.2.1