fix macro WIN32_LEAN_AND_MEAN redefined
authorCareles <[email protected]>
Mon, 6 Jan 2025 02:56:53 +0000 (6 10:56 +0800)
committerCareles <[email protected]>
Mon, 6 Jan 2025 02:56:53 +0000 (6 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 4da3efb..2b5f858 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 5e12c51..58e1313 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