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.
This commit is contained in:
Ori Bernstein 2020-02-10 19:26:39 -08:00
parent 5f7a6b7ea3
commit 98374d6eea
3 changed files with 0 additions and 10 deletions

View file

@ -88,14 +88,8 @@ extern int fscanf(FILE *, const char *, ...);
extern int printf(const char *, ...); extern int printf(const char *, ...);
extern int scanf(const char *, ...); extern int scanf(const char *, ...);
extern int sprintf(char *, 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 snprintf(char *, size_t, const char *, ...);
extern int vsnprintf(char *, size_t, const char *, va_list); 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 sscanf(const char *, const char *, ...);
extern int vfprintf(FILE *, const char *, va_list); extern int vfprintf(FILE *, const char *, va_list);
extern int vprintf(const char *, va_list); extern int vprintf(const char *, va_list);

View file

@ -1,8 +1,6 @@
/* /*
* pANS stdio -- sprintf * pANS stdio -- sprintf
*/ */
#define _C99_SNPRINTF_EXTENSION
#include "iolib.h" #include "iolib.h"
int snprintf(char *buf, size_t nbuf, const char *fmt, ...){ int snprintf(char *buf, size_t nbuf, const char *fmt, ...){

View file

@ -1,8 +1,6 @@
/* /*
* pANS stdio -- vsnprintf * pANS stdio -- vsnprintf
*/ */
#define _C99_SNPRINTF_EXTENSION
#include "iolib.h" #include "iolib.h"
int vsnprintf(char *buf, size_t nbuf, const char *fmt, va_list args){ int vsnprintf(char *buf, size_t nbuf, const char *fmt, va_list args){