Committing in .

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
This commit is contained in:
Jouk Jansen 1999-11-12 11:16:52 +00:00
parent d554e5da38
commit af9d1662d9

View File

@ -14,12 +14,19 @@
#include <sys/types.h> #include <sys/types.h>
#include <netdb.h> #include <netdb.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef vms #ifdef __VMS__
#define SOCK_LEN_TYP (unsigned int*)
#include <socket.h> #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 #else
#include <sys/socket.h> #include <sys/socket.h>
#endif
#include <sys/un.h> #include <sys/un.h>
#define SOCK_LEN_TYP (int*)
#endif
#include <sys/time.h> #include <sys/time.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
@ -218,7 +225,7 @@ GAddress *GSocket_GetLocal(GSocket *socket)
size = sizeof(addr); 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; socket->m_error = GSOCK_IOERR;
return NULL; return NULL;
} }
@ -799,7 +806,8 @@ int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size)
fromlen = sizeof(from); fromlen = sizeof(from);
MASK_SIGNAL(); 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(); UNMASK_SIGNAL();
if (ret == -1) if (ret == -1)
@ -901,7 +909,8 @@ void _GSocket_Detected_Write(GSocket *socket)
socket->m_establishing = FALSE; socket->m_establishing = FALSE;
len = sizeof(error); 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) if (error)
{ {