Browse Source

resolve mis-matching of winsock versions

Chris Brunner 15 years ago
parent
commit
ab1016269c

+ 4 - 0
direct/src/plugin_standalone/p3dEmbed.h

@@ -15,6 +15,10 @@
 #ifndef P3DEMBED_H
 #ifndef P3DEMBED_H
 #define P3DEMBED_H
 #define P3DEMBED_H
 
 
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
 #include "panda3dBase.h"
 #include "panda3dBase.h"
 #include "p3d_plugin.h"
 #include "p3d_plugin.h"
 #include "httpChannel.h"
 #include "httpChannel.h"

+ 5 - 0
direct/src/plugin_standalone/panda3d.h

@@ -15,6 +15,11 @@
 #ifndef PANDA3D_H
 #ifndef PANDA3D_H
 #define PANDA3D_H
 #define PANDA3D_H
 
 
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+
 #include "panda3dBase.h"
 #include "panda3dBase.h"
 #include "p3d_plugin.h"
 #include "p3d_plugin.h"
 #include "httpChannel.h"
 #include "httpChannel.h"

+ 7 - 6
direct/src/plugin_standalone/panda3dBase.cxx

@@ -12,6 +12,12 @@
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#else
+#include <signal.h>
+#endif
 #include "panda3dBase.h"
 #include "panda3dBase.h"
 #include "httpClient.h"
 #include "httpClient.h"
 #include "find_root_dir.h"
 #include "find_root_dir.h"
@@ -26,11 +32,6 @@
 #include <ctype.h>
 #include <ctype.h>
 #include <sstream>
 #include <sstream>
 #include <algorithm>
 #include <algorithm>
-#ifdef _WIN32
-#include <windows.h>
-#else
-#include <signal.h>
-#endif
 
 
 // The amount of time in seconds to wait for new messages.
 // The amount of time in seconds to wait for new messages.
 static const double wait_cycle = 0.2;
 static const double wait_cycle = 0.2;
@@ -269,7 +270,7 @@ make_parent_window() {
 
 
   HINSTANCE application = GetModuleHandle(NULL);
   HINSTANCE application = GetModuleHandle(NULL);
   ZeroMemory(&wc, sizeof(WNDCLASS));
   ZeroMemory(&wc, sizeof(WNDCLASS));
-  wc.lpfnWndProc = window_proc;
+  wc.lpfnWndProc = (WNDPROC)window_proc;
   wc.hInstance = application;
   wc.hInstance = application;
   wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
   wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
   wc.lpszClassName = "panda3d";
   wc.lpszClassName = "panda3d";