ref: 98374d6eeae45278a5e21a53d7ad40d2afdd8439
parent: 5f7a6b7ea3c4ae1b51beffe3309e9b6b0491e71f
author: Ori Bernstein <[email protected]>
date: Mon Feb 10 14:26:39 EST 2020
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.
--- a/sys/include/ape/stdio.h
+++ b/sys/include/ape/stdio.h
@@ -88,14 +88,8 @@
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);
--- 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, ...){
--- 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){