Diff for /XML/nanohttp.c between versions 1.1 and 1.2

version 1.1, 1999/09/17 10:21:04 version 1.2, 1999/09/17 10:38:18
Line 311  static int xmlNanoHTTPConnectAttempt(str Line 311  static int xmlNanoHTTPConnectAttempt(str
     struct sockaddr_in sin;      struct sockaddr_in sin;
     fd_set wfd;      fd_set wfd;
     struct timeval tv;      struct timeval tv;
       int status;
           
     if(s==-1) {      if(s==-1) {
         perror("socket");          perror("socket");
         return(-1);          return(-1);
     }      }
           
     if(fcntl(s, F_SETFL, FNDELAY)==-1) {  #ifdef _WINSOCKAPI_
       {
           long levents = FD_READ | FD_WRITE | FD_ACCEPT |
                          FD_CONNECT | FD_CLOSE ;
           int rv = 0 ;
           u_long one = 1;
   
           status = ioctlsocket(sockfd, FIONBIO, &one) == SOCKET_ERROR ? -1 : 0;
       }
   #else /* _WINSOCKAPI_ */
   #if defined(VMS)
       {
           int enable = 1;
           status = IOCTL(sockfd, FIONBIO, &enable);
       }
   #else /* VMS */
       if((status = fcntl(sockfd, F_GETFL, 0)) != -1) {
   #ifdef O_NONBLOCK
           status |= O_NONBLOCK;
   #else /* O_NONBLOCK */
   #ifdef F_NDELAY
           status |= F_NDELAY;
   #endif /* F_NDELAY */
   #endif /* !O_NONBLOCK */
           status = fcntl(sockfd, F_SETFL, status);
       }
       if(status < 0) {
         perror("nonblocking");          perror("nonblocking");
         close(s);          close(s);
         return(-1);          return(-1);
     }      }
   #endif /* !VMS */
   #endif /* !_WINSOCKAPI_ */
   
   
     sin.sin_family = AF_INET;         sin.sin_family = AF_INET;   
     sin.sin_addr   = ia;      sin.sin_addr   = ia;

Removed from v.1.1  
changed lines
  Added in v.1.2


Webmaster