From 98374d6eeae45278a5e21a53d7ad40d2afdd8439 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Mon, 10 Feb 2020 19:26:39 -0800 Subject: [PATCH] remove C99_SPRINTF_EXTENSION define. It's been 20 years since c99 came out. By now, if code hasn't been fixed, it's not going to be. Requiring this define just confuses porters. --- sys/include/ape/stdio.h | 6 ------ sys/src/ape/lib/ap/stdio/snprintf.c | 2 -- sys/src/ape/lib/ap/stdio/vsnprintf.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/sys/include/ape/stdio.h b/sys/include/ape/stdio.h index cadc93c40..80374c3b6 100644 --- a/sys/include/ape/stdio.h +++ b/sys/include/ape/stdio.h @@ -88,14 +88,8 @@ extern int fscanf(FILE *, const char *, ...); extern int printf(const char *, ...); extern int scanf(const char *, ...); extern int sprintf(char *, const char *, ...); -#ifdef _C99_SNPRINTF_EXTENSION /* user knows about c99 out-of-bounds returns */ extern int snprintf(char *, size_t, const char *, ...); extern int vsnprintf(char *, size_t, const char *, va_list); -#else -/* draw errors on any attempt to use *snprintf value so old code gets changed */ -extern void snprintf(char *, size_t, const char *, ...); -extern void vsnprintf(char *, size_t, const char *, va_list); -#endif extern int sscanf(const char *, const char *, ...); extern int vfprintf(FILE *, const char *, va_list); extern int vprintf(const char *, va_list); diff --git a/sys/src/ape/lib/ap/stdio/snprintf.c b/sys/src/ape/lib/ap/stdio/snprintf.c index 0c5c2ae8f..92ec50352 100644 --- a/sys/src/ape/lib/ap/stdio/snprintf.c +++ b/sys/src/ape/lib/ap/stdio/snprintf.c @@ -1,8 +1,6 @@ /* * pANS stdio -- sprintf */ -#define _C99_SNPRINTF_EXTENSION - #include "iolib.h" int snprintf(char *buf, size_t nbuf, const char *fmt, ...){ diff --git a/sys/src/ape/lib/ap/stdio/vsnprintf.c b/sys/src/ape/lib/ap/stdio/vsnprintf.c index 45830fffb..57f8b8beb 100644 --- a/sys/src/ape/lib/ap/stdio/vsnprintf.c +++ b/sys/src/ape/lib/ap/stdio/vsnprintf.c @@ -1,8 +1,6 @@ /* * pANS stdio -- vsnprintf */ -#define _C99_SNPRINTF_EXTENSION - #include "iolib.h" int vsnprintf(char *buf, size_t nbuf, const char *fmt, va_list args){