Skip to content

Commit

Permalink
Code: Fixes include guard condition.
Browse files Browse the repository at this point in the history
With this change, we can compile `src/c99func.c` without any extra
condition in down-streams' build process.
  • Loading branch information
am11 committed Aug 29, 2015
1 parent 6d5b6b2 commit ba732f7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/c99func.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,12 @@
THE SOFTWARE.
*/

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_NONSTDC_NO_DEPRECATE
#endif
#if defined(_MSC_VER) && _MSC_VER < 1900

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#ifdef snprintf
#undef snprintf
#endif

static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
{
int count = -1;
Expand All @@ -57,3 +50,5 @@ int snprintf(char* str, size_t size, const char* format, ...)

return count;
}

#endif

0 comments on commit ba732f7

Please sign in to comment.