]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Define WIN32_LEAN_AND_MEAN globally instead of anecdotically
authorOndřej Surý <ondrej@isc.org>
Thu, 28 May 2020 07:02:45 +0000 (09:02 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 28 May 2020 09:28:44 +0000 (11:28 +0200)
config.h.win32
lib/isc/glob.c
lib/isc/win32/condition.c
lib/isc/win32/include/isc/platform.h.in
lib/isc/win32/include/isc/stdatomic.h

index 475ab5ba30199f6b7adc5cded1eb7e7302bc5321..44ebffec15df5ce64a6ed61c75c526f1c3e2e6c0 100644 (file)
@@ -242,9 +242,9 @@ typedef __int64 off_t;
 #include <io.h>
 #define isatty _isatty
 
-#ifndef _WINSOCKAPI_
-#define _WINSOCKAPI_   /* Prevent inclusion of winsock.h in windows.h */
-#endif
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1 /* Prevent inclusion of winsock.h in windows.h */
+#endif /* WIN32_LEAN_AND_MEAN */
 
 /*
  * Make the number of available sockets large
index 559815525b354f6bcae505d5ebaa7edfcd7e1dac..769acbda855f522a349af581a1909a9e09e4ce83 100644 (file)
@@ -24,7 +24,6 @@
 #include <glob.h>
 #elif defined(_WIN32)
 #include <stdlib.h>
-#define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>
 
 #include <isc/list.h>
index 0b0bde191f9791eb3b9b6e753a5bc3424e0547a9..176043eb41e4e5ea20695bfc8807f1562e4cb77e 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <inttypes.h>
 #include <stdbool.h>
+#include <stdlib.h>
 
 #include <isc/assertions.h>
 #include <isc/condition.h>
index e2bf50b681925134bb06c62c6a3e35358c644817..7f03d666a3485f98fcc98e307965c885eaa9434f 100644 (file)
@@ -41,6 +41,7 @@ typedef uint32_t socklen_t;
  * Limits
  */
 
+#include <stdlib.h>
 #ifndef NAME_MAX
 #define NAME_MAX _MAX_FNAME
 #endif
index aa028ceae2dd5764ce68af1db3d510183b760e08..fe19df001dae593b3e2736d991d42ec6f32f60ad 100644 (file)
@@ -11,7 +11,6 @@
 
 #pragma once
 
-#define WIN32_LEAN_AND_MEAN
 #include <intrin.h>
 #include <stdbool.h>
 #include <stddef.h>