Comments (2)
check-_WIN32-not-WIN32-in-source-files.patch
This may not work for everyone, but here it is:
diff --git a/json_util.c b/json_util.c
index 3e6a6c6..fe5c354 100644
--- a/json_util.c
+++ b/json_util.c
@@ -37,11 +37,11 @@
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
-#ifdef WIN32
+#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <io.h>
#include <windows.h>
-#endif /* defined(WIN32) */
+#endif /* defined(_WIN32) */
#if !defined(HAVE_OPEN) && defined(WIN32)
#define open _open
diff --git a/random_seed.c b/random_seed.c
index 7945824..710f383 100644
--- a/random_seed.c
+++ b/random_seed.c
@@ -253,7 +253,7 @@ static int get_dev_random_seed(int *seed)
/* get_cryptgenrandom_seed */
-#ifdef WIN32
+#ifdef _WIN32
#define HAVE_CRYPTGENRANDOM 1
diff --git a/tests/test_util_file.c b/tests/test_util_file.c
index d0cb8a1..64c2928 100644
--- a/tests/test_util_file.c
+++ b/tests/test_util_file.c
@@ -3,7 +3,7 @@
#endif
#include "strerror_override.h"
#include "strerror_override_private.h"
-#ifdef WIN32
+#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <io.h>
#include <windows.h>
diff --git a/vasprintf_compat.h b/vasprintf_compat.h
index 59b2e96..617180b 100644
--- a/vasprintf_compat.h
+++ b/vasprintf_compat.h
@@ -8,7 +8,7 @@
#include "snprintf_compat.h"
-#ifndef WIN32
+#ifndef _WIN32
#include <stdarg.h>
#endif /* !defined(WIN32) */
#include <stdint.h>
@@ -18,7 +18,7 @@
/* CAW: compliant version of vasprintf */
static int vasprintf(char **buf, const char *fmt, va_list ap)
{
-#ifndef WIN32
+#ifndef _WIN32
static char _T_emptybuffer = '\0';
va_list ap2;
#endif /* !defined(WIN32) */
@@ -30,7 +30,7 @@ static int vasprintf(char **buf, const char *fmt, va_list ap)
return -1;
}
-#ifdef WIN32
+#ifdef _WIN32
chars = _vscprintf(fmt, ap);
#else /* !defined(WIN32) */
/* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite
@@ -39,7 +39,7 @@ static int vasprintf(char **buf, const char *fmt, va_list ap)
va_copy(ap2, ap);
chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap2);
va_end(ap2);
-#endif /* defined(WIN32) */
+#endif /* defined(_WIN32) */
if (chars < 0 || (size_t)chars + 1 > SIZE_MAX / sizeof(char))
{
return -1;
from json-c.
Whoops, this could be a duplicate of #831
from json-c.
Related Issues (20)
- Symbol not found during linking stage of libjson-c.so HOT 1
- RFE: please start making github releases
- Cannot build with clang-cl HOT 3
- I am looking whether this CVE - CVE-2021-32292 is impacted by json-c version v0.13.1or not ? HOT 2
- memory leak issue in 0.13 HOT 1
- Null pointer dereference in tokener_parse_ex_fuzzer.cc HOT 1
- Cannot link properly using cmake HOT 2
- Memory leak when enable HAVE_SETLOCALE and HAVE_USELOCALE HOT 2
- Random crash in json_tokener_parse HOT 7
- Assignment bug in json_pointer.c HOT 2
- Doxygen: mis-wording in `json_object_put`
- json_object_from_file caused calloc SIGSEGV HOT 2
- Missing return description
- Allow NULL in json_object_new_string() and json_object_new_string_len() HOT 3
- json_tokener_parse_verbose does not set the error indicator when it fails to allocate the tokener HOT 3
- json_tokener_parse_verbose sets the error indicator to a wrong value when there is a memory allocation failure HOT 3
- json_tokener_parse is not multithread-safe on some platforms HOT 10
- Using libjson-c.so or compiling from source seg faults on json_tokener_parse_ex in alpine docker container HOT 4
- json_tokener_parse_verbose sets the error indicator to a wrong value when there is a memory allocation failure HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-c.