C/C++ differences
authorDavid Elliott <dfe@tgwbd.org>
Thu, 29 Jul 2004 02:07:42 +0000 (02:07 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Thu, 29 Jul 2004 02:07:42 +0000 (02:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/gsocket.cpp
src/msw/gsockmsw.cpp

index 74783e0b1b9310bc4e4d77d0028ea58ed340bba6..c045edb02eb1f7a11d58ec9ed1eb96fbfdb08f43 100644 (file)
@@ -3,7 +3,7 @@
  * Name:    gsocket.c
  * Author:  Guillermo Rodriguez Garcia <guille@iies.es>
  * Purpose: GSocket main MSW file
- * Licence: The wxWidgets licence
+ * Licence: The wxWindows licence
  * CVSID:   $Id$
  * -------------------------------------------------------------------------
  */
@@ -863,7 +863,7 @@ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
 
         socket->m_establishing = FALSE;
 
-        getsockopt(socket->m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, &len);
+        getsockopt(socket->m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);
 
         if (error)
         {
@@ -1010,7 +1010,7 @@ void GSocket_UnsetCallback(GSocket *socket, GSocketEventFlags flags)
 GSocketError GSocket_GetSockOpt(GSocket *socket, int level, int optname,
                                 void *optval, int *optlen)
 {
-    if (getsockopt(socket->m_fd, level, optname, optval, optlen) == 0)
+    if (getsockopt(socket->m_fd, level, optname, (char*)optval, optlen) == 0)
     {
         return GSOCK_NOERROR;
     }
@@ -1020,7 +1020,7 @@ GSocketError GSocket_GetSockOpt(GSocket *socket, int level, int optname,
 GSocketError GSocket_SetSockOpt(GSocket *socket, int level, int optname,
                                 const void *optval, int optlen)
 {
-    if (setsockopt(socket->m_fd, level, optname, optval, optlen) == 0)
+    if (setsockopt(socket->m_fd, level, optname, (char*)optval, optlen) == 0)
     {
         return GSOCK_NOERROR;
     }
index 8e75239ea5f2d22a5e62c981e1701b34b37920cf..4e2622f8f46bff213f33435e33bd6e3ea8c1b084 100644 (file)
@@ -55,7 +55,7 @@
 #include "wx/msw/gsockmsw.h"
 #include "wx/gsocket.h"
 
-HINSTANCE wxGetInstance(void);
+extern "C" HINSTANCE wxGetInstance(void);
 #define INSTANCE wxGetInstance()
 
 #else
@@ -94,7 +94,7 @@ HINSTANCE wxGetInstance(void);
 #define CLASSNAME  TEXT("_GSocket_Internal_Window_Class")
 
 /* implemented in utils.cpp */
-extern WXDLLIMPEXP_BASE HWND
+extern "C" WXDLLIMPEXP_BASE HWND
 wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
 
 /* Maximum number of different GSocket objects at a given time.