]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
fix macro WIN32_LEAN_AND_MEAN redefined 884/head
authorCareles <zhancheng1996@gmail.com>
Mon, 6 Jan 2025 02:56:53 +0000 (10:56 +0800)
committerCareles <zhancheng1996@gmail.com>
Mon, 6 Jan 2025 02:56:53 +0000 (10:56 +0800)
json-c as add_subdirectory and project cmakelists.txt has add_definitions(-DWIN32_LEAN_AND_MEAN)

json_util.c
linkhash.c

index 4da3efb4f5e757815d30ac69848a1e7b48b7a922..2b5f858f1039a3a752839fb48b68459ecad6a244 100644 (file)
@@ -38,7 +38,9 @@
 #endif /* HAVE_UNISTD_H */
 
 #ifdef _WIN32
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <io.h>
 #include <windows.h>
 #endif /* defined(_WIN32) */
index 5e12c51e7c6f2d55dc56a11836f5d284e46fc529..58e13130914dc84900163599a716692edae5b574 100644 (file)
@@ -25,7 +25,9 @@
 #endif
 
 #if defined(_MSC_VER) || defined(__MINGW32__)
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h> /* Get InterlockedCompareExchange */
 #endif