]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gsocket.c
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / msw / gsocket.c
index 11f17d00a925a8064f68cfff420576c0763e84f1..729886938afbcb8ff876bce54fa8590bee3705ed 100644 (file)
@@ -1164,6 +1164,7 @@ GSocketError _GAddress_translate_to(GAddress *address,
 
 GSocketError _GAddress_Init_INET(GAddress *address)
 {
+  address->m_len = sizeof(struct sockaddr_in);
   address->m_addr = (struct sockaddr *) malloc(address->m_len);
   if (address->m_addr == NULL)
   {
@@ -1171,7 +1172,6 @@ GSocketError _GAddress_Init_INET(GAddress *address)
     return GSOCK_MEMERR;
   }
 
-  address->m_len = sizeof(struct sockaddr_in);
   address->m_family = GSOCK_INET;
   address->m_realfamily = PF_INET;
   ((struct sockaddr_in *)address->m_addr)->sin_family = AF_INET;
@@ -1350,11 +1350,15 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
   return GSOCK_INVADDR;
 }
 
+#else /* !wxUSE_SOCKETS */
 
-#endif  /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
-
-
+/* 
+ * translation unit shouldn't be empty, so include this typedef to make the
+ * compiler (VC++ 6.0, for example) happy
+ */
+typedef (*wxDummy)();
 
+#endif  /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
 
 /* Diferencias con la version Unix:
  *  - El descriptor es SOCKET y no int