./json_util.h
./linkhash.h
./math_compat.h
+ ./strdup_compat.h
./printbuf.h
./random_seed.h
)
json_visit.h \
linkhash.h \
math_compat.h \
+ strdup_compat.h \
printbuf.h \
random_seed.h
<ClInclude Include="json_util.h" />
<ClInclude Include="linkhash.h" />
<ClInclude Include="math_compat.h" />
+ <ClInclude Include="strdup_compat.h" />
<ClInclude Include="printbuf.h" />
<ClInclude Include="random_seed.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
<ClInclude Include="math_compat.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="strdup_compat.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="random_seed.h">
<Filter>Header Files</Filter>
</ClInclude>
<None Include="README-WIN32.html" />
<None Include="README.html" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
#include "json_object_private.h"
#include "json_util.h"
#include "math_compat.h"
-
-#if !defined(HAVE_STRDUP) && defined(_MSC_VER)
- /* MSC has the version as _strdup */
-# define strdup _strdup
-#elif !defined(HAVE_STRDUP)
-# error You do not have strdup on your system.
-#endif /* HAVE_STRDUP */
+#include "strdup_compat.h"
#if !defined(HAVE_SNPRINTF) && defined(_MSC_VER)
/* MSC has the version as _snprintf */
#include <ctype.h>
#include "json_pointer.h"
+#include "strdup_compat.h"
/**
* JavaScript Object Notation (JSON) Pointer
#include "json_object.h"
#include "json_tokener.h"
#include "json_util.h"
+#include "strdup_compat.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
#define jt_hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
-#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
--- /dev/null
+#ifndef __strdup_compat_h
+#define __strdup_compat_h
+
+#if !defined(HAVE_STRDUP) && defined(_MSC_VER)
+ /* MSC has the version as _strdup */
+# define strdup _strdup
+#elif !defined(HAVE_STRDUP)
+# error You do not have strdup on your system.
+#endif /* HAVE_STRDUP */
+
+#endif