]> git.saurik.com Git - wxWidgets.git/commitdiff
Committing in .
authorJouk Jansen <joukj@hrem.nano.tudelft.nl>
Fri, 12 Nov 1999 11:16:52 +0000 (11:16 +0000)
committerJouk Jansen <joukj@hrem.nano.tudelft.nl>
Fri, 12 Nov 1999 11:16:52 +0000 (11:16 +0000)
 VMS patch
 Adding some expicit type casts

 Modified Files:
  wxWindows/src/unix/gsocket.c

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/gsocket.c

index 004f6c38dd935ffa5cc2fe521789502f0e479d25..12f7eb5845fe9f73101bc4c7f6074a368b1ece33 100644 (file)
 #include <sys/types.h>
 #include <netdb.h>
 #include <sys/ioctl.h>
-#ifdef vms
+#ifdef __VMS__
+#define SOCK_LEN_TYP (unsigned int*)
 #include <socket.h>
+struct sockaddr_un {
+       u_char  sun_len;                /* sockaddr len including null */
+       u_char  sun_family;             /* AF_UNIX */
+       char    sun_path[108];          /* path name (gag) */
+};
 #else
 #include <sys/socket.h>
-#endif
 #include <sys/un.h>
+#define SOCK_LEN_TYP (int*)
+#endif
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -218,7 +225,7 @@ GAddress *GSocket_GetLocal(GSocket *socket)
 
   size = sizeof(addr);
 
-  if (getsockname(socket->m_fd, &addr, &size) < 0) {
+  if (getsockname(socket->m_fd, &addr, SOCK_LEN_TYP &size) < 0) {
     socket->m_error = GSOCK_IOERR;
     return NULL;
   }
@@ -799,7 +806,8 @@ int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size)
   fromlen = sizeof(from);
 
   MASK_SIGNAL();
-  ret = recvfrom(socket->m_fd, buffer, size, 0, &from, &fromlen);
+  ret = recvfrom(socket->m_fd, buffer, size, 0, &from,
+                SOCK_LEN_TYP &fromlen);
   UNMASK_SIGNAL();
 
   if (ret == -1)
@@ -901,7 +909,8 @@ void _GSocket_Detected_Write(GSocket *socket)
     socket->m_establishing = FALSE;
 
     len = sizeof(error);
-    getsockopt(socket->m_fd, SOL_SOCKET, SO_ERROR, (void*) &error, &len);
+    getsockopt(socket->m_fd, SOL_SOCKET, SO_ERROR, (void*) &error,
+              SOCK_LEN_TYP &len);
 
     if (error)
     {