diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-08-21 17:33:42 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-08-21 17:33:42 +0000 |
| commit | 2b7d40ea0c8e96b1322488f9154c89a7a7dd55e7 (patch) | |
| tree | 5280e4e4936ebb72ad062c587af08d1ebc068892 /win32/unifdef.h | |
| parent | 9b3517a49d4e15b97a68bf9e9d68ddda104bf79d (diff) | |
Diffstat (limited to 'win32/unifdef.h')
| -rw-r--r-- | win32/unifdef.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/win32/unifdef.h b/win32/unifdef.h index bebf7381e832..2fe301bd026e 100644 --- a/win32/unifdef.h +++ b/win32/unifdef.h @@ -52,11 +52,17 @@ /* used by err.c and getopt.c */ #define _getprogname() "unifdef" +/* + * The snprintf() workaround is unnecessary in Visual Studio 2015 or later + * but dogma dictates that #if directives are not allowed inside unifdef. + */ +#define snprintf c99_snprintf + /* win32.c */ -int replace(const char *old, const char *new); +int replace(const char *oldname, const char *newname); FILE *mktempmode(char *tmp, int mode); FILE *fbinmode(FILE *fp); -int snprintf(char *buf, size_t buflen, const char *format, ...); +int c99_snprintf(char *buf, size_t buflen, const char *format, ...); /* err.c */ void err(int, const char *, ...); |
