Replaced #if HAVE_X with #ifdef HAVE_X as the former test is troublemaker with #define HAVE_X where #define HAVE_X 1|0 is meant.

This commit is contained in:
Mateusz Loskot
2012-05-21 23:22:36 +01:00
parent 1abaaee658
commit a6f39a3c0c
5 changed files with 33 additions and 14 deletions

View File

@@ -31,6 +31,13 @@
#include "json_tokener.h"
#include "json_util.h"
#if !HAVE_STRDUP && defined(_MSC_VER)
/* MSC has the version as _strdup */
# define strdup _strdup
#elif !HAVE_STRDUP
# error You do not have strdup on your system.
#endif /* HAVE_STRDUP */
#if !HAVE_STRNCASECMP && defined(_MSC_VER)
/* MSC has the version as _strnicmp */
# define strncasecmp _strnicmp
@@ -38,7 +45,6 @@
# error You do not have strncasecmp on your system.
#endif /* HAVE_STRNCASECMP */
static const char* json_null_str = "null";
static const char* json_true_str = "true";
static const char* json_false_str = "false";