Browse Source

win-stats: Define WIN32_LEAN_AND_MEAN before including windows.h

This prevents pulling in winsock 1, which will cause compiler
errors when p3net later tries to pull in winsock 2.
Sam Edwards 6 years ago
parent
commit
ff06135412

+ 3 - 0
pandatool/src/win-stats/winStats.cxx

@@ -16,6 +16,9 @@
 #include "winStatsServer.h"
 #include "config_pstatclient.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 static const char *toplevel_class_name = "pstats";

+ 3 - 0
pandatool/src/win-stats/winStatsChartMenu.h

@@ -16,6 +16,9 @@
 
 #include "pandatoolbase.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsMonitor;

+ 3 - 0
pandatool/src/win-stats/winStatsGraph.h

@@ -18,6 +18,9 @@
 #include "winStatsLabelStack.h"
 #include "pmap.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsMonitor;

+ 3 - 0
pandatool/src/win-stats/winStatsLabel.h

@@ -16,6 +16,9 @@
 
 #include "pandatoolbase.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsMonitor;

+ 3 - 0
pandatool/src/win-stats/winStatsLabelStack.h

@@ -17,6 +17,9 @@
 #include "pandatoolbase.h"
 #include "pvector.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsLabel;

+ 3 - 0
pandatool/src/win-stats/winStatsMonitor.h

@@ -23,6 +23,9 @@
 #include "pvector.h"
 #include "pmap.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsServer;

+ 3 - 0
pandatool/src/win-stats/winStatsPianoRoll.h

@@ -20,6 +20,9 @@
 #include "pStatPianoRoll.h"
 #include "pointerTo.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsMonitor;

+ 3 - 0
pandatool/src/win-stats/winStatsStripChart.h

@@ -20,6 +20,9 @@
 #include "pStatStripChart.h"
 #include "pointerTo.h"
 
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 class WinStatsMonitor;