dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/support dns.c, 1.3, 1.4 socket.c, 1.16,


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/support dns.c, 1.3, 1.4 socket.c, 1.16, 1.17
Date: Mon, 22 Sep 2003 05:38:11 -0400

Update of /cvsroot/dotgnu-pnet/pnet/support
In directory subversions:/tmp/cvs-serv24147/support

Modified Files:
        dns.c socket.c 
Log Message:


Make sure that the socket functions are properly detected
under mingw32 (bug #3511).


Index: dns.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/dns.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** dns.c       17 Jun 2003 05:55:14 -0000      1.3
--- dns.c       22 Sep 2003 09:38:08 -0000      1.4
***************
*** 23,26 ****
--- 23,28 ----
  #ifdef IL_WIN32_NATIVE
  #include <winsock.h>
+ #define       HAVE_GETHOSTBYNAME      1
+ #define       HAVE_GETHOSTBYADDR      1
  #else
  #if HAVE_STDLIB_H

Index: socket.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/socket.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** socket.c    4 Jul 2003 15:26:01 -0000       1.16
--- socket.c    22 Sep 2003 09:38:09 -0000      1.17
***************
*** 28,31 ****
--- 28,36 ----
  #include <time.h>
  #define       close   closesocket
+ #define       ioctl   ioctlsocket
+ #define       HAVE_SIN6_SCOPE_ID      1
+ #define       HAVE_IOCTL                      1
+ #define       HAVE_SETSOCKOPT         1
+ #define       HAVE_GETSOCKOPT         1
  #else
  #if TIME_WITH_SYS_TIME
***************
*** 679,683 ****
  {
  #if defined(FIONBIO) && defined(HAVE_IOCTL)
!       return (ioctl((int)(ILNativeInt)sockfd, FIONBIO, &flag) >= 0);
  #else
        ILSysIOSetErrno(IL_ERRNO_EINVAL);
--- 684,688 ----
  {
  #if defined(FIONBIO) && defined(HAVE_IOCTL)
!       return (ioctl((int)(ILNativeInt)sockfd, FIONBIO, (void *)&flag) >= 0);
  #else
        ILSysIOSetErrno(IL_ERRNO_EINVAL);
***************
*** 690,694 ****
  #if defined(FIONREAD) && defined(HAVE_IOCTL)
        int result = 0;
!       if(ioctl((int)(ILNativeInt)sockfd, FIONREAD, &result) >= 0)
        {
                return (ILInt32)result;
--- 695,699 ----
  #if defined(FIONREAD) && defined(HAVE_IOCTL)
        int result = 0;
!       if(ioctl((int)(ILNativeInt)sockfd, FIONREAD, (void *)&result) >= 0)
        {
                return (ILInt32)result;
***************
*** 900,904 ****
        }
        return (setsockopt((int)(ILNativeInt)sockfd,nativeLevel,nativeName,
!                       &value, sizeof(value))== 0);
  #else
        ILSysIOSetErrno(IL_ERRNO_EINVAL);
--- 905,909 ----
        }
        return (setsockopt((int)(ILNativeInt)sockfd,nativeLevel,nativeName,
!                       (void *)&value, sizeof(value))== 0);
  #else
        ILSysIOSetErrno(IL_ERRNO_EINVAL);
***************
*** 911,914 ****
--- 916,920 ----
  {
  #ifdef HAVE_GETSOCKOPT
+       int option = 0;
        int len=sizeof(ILInt32);
        ILInt32 nativeLevel, nativeName;
***************
*** 918,923 ****
                return 0;
        }
!       return (getsockopt((int)(ILNativeInt)sockfd,nativeLevel,nativeName,
!                                                               value,&len) == 
0);
  #else
        ILSysIOSetErrno(IL_ERRNO_EINVAL);
--- 924,937 ----
                return 0;
        }
!       if(getsockopt((int)(ILNativeInt)sockfd,nativeLevel,nativeName,
!                                                               (void 
*)&option,&len) == 0)
!       {
!               *value = (ILInt32)option;
!               return 1;
!       }
!       else
!       {
!               return 0;
!       }
  #else
        ILSysIOSetErrno(IL_ERRNO_EINVAL);
***************
*** 932,937 ****
        _linger.l_onoff=enabled;
        _linger.l_linger=seconds;
!       if(setsockopt((int)(ILNativeInt)handle, SOL_SOCKET, 
SO_LINGER,&(_linger),
!                                               sizeof(struct linger)) < 0)
        {
                return 0;
--- 946,951 ----
        _linger.l_onoff=enabled;
        _linger.l_linger=seconds;
!       if(setsockopt((int)(ILNativeInt)handle, SOL_SOCKET, SO_LINGER,
!                                               (void *)&(_linger), 
sizeof(struct linger)) < 0)
        {
                return 0;
***************
*** 949,954 ****
        struct linger _linger;
        int size=sizeof(struct linger);
!       if(getsockopt((int)(ILNativeInt)handle, SOL_SOCKET, 
SO_LINGER,&(_linger),
!                                               &size) < 0)
        {
                return 0;
--- 963,968 ----
        struct linger _linger;
        int size=sizeof(struct linger);
!       if(getsockopt((int)(ILNativeInt)handle, SOL_SOCKET, SO_LINGER,
!                                 (void *)&(_linger), &size) < 0)
        {
                return 0;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]