Giter Club home page Giter Club logo

Comments (2)

gitartpiano avatar gitartpiano commented on July 28, 2024

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.

gitartpiano avatar gitartpiano commented on July 28, 2024

Whoops, this could be a duplicate of #831

from json-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.