Skip to content

Commit 9ed0093

Browse files
committed
Merge pull request #1495 from am11/master
Fixes include guard condition for VS
2 parents 98a6a43 + ba732f7 commit 9ed0093

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/c99func.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@
2121
THE SOFTWARE.
2222
*/
2323

24-
#ifdef _MSC_VER
25-
#define _CRT_SECURE_NO_WARNINGS
26-
#define _CRT_NONSTDC_NO_DEPRECATE
27-
#endif
24+
#if defined(_MSC_VER) && _MSC_VER < 1900
2825

2926
#include <stdio.h>
3027
#include <stdlib.h>
3128
#include <stdarg.h>
3229

33-
#ifdef snprintf
34-
#undef snprintf
35-
#endif
36-
3730
static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
3831
{
3932
int count = -1;
@@ -57,3 +50,5 @@ int snprintf(char* str, size_t size, const char* format, ...)
5750

5851
return count;
5952
}
53+
54+
#endif

0 commit comments

Comments
 (0)