VirtualBox

Changeset 30220 in vbox for trunk/src


Ignore:
Timestamp:
Jun 16, 2010 1:48:47 AM (15 years ago)
Author:
vboxsync
Message:

lwip/src/api/sockets.c: errno.h and MSC; who defines ERRNO in general?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/lwip/src/api/sockets.c

    r17797 r30220  
    3434
    3535#include <string.h>
    36 #include <errno.h>
     36#ifndef _MSC_VER /* Why is errno.h included here - see lwip/arch.h -> lwip/cc.h */
     37# include <errno.h>
     38#endif
    3739
    3840#include "lwip/opt.h"
     
    9799#ifdef ERRNO
    98100#define set_errno(err) errno = (err)
     101# ifdef _MSC_VER
     102#  error "Curious bird: Where is ERRNO defined for MSC?"
     103# endif
    99104#else
    100105#define set_errno(err)
     
    984989  /* Do length and type checks for the various options first, to keep it readable. */
    985990  switch( level ) {
    986    
     991
    987992/* Level: SOL_SOCKET */
    988993  case SOL_SOCKET:
    989994      switch(optname) {
    990          
     995
    991996      case SO_ACCEPTCONN:
    992997      case SO_BROADCAST:
     
    10161021      }  /* switch */
    10171022      break;
    1018                      
     1023
    10191024/* Level: IPPROTO_IP */
    10201025  case IPPROTO_IP:
     
    10351040      }  /* switch */
    10361041      break;
    1037          
     1042
    10381043/* Level: IPPROTO_TCP */
    10391044  case IPPROTO_TCP:
     
    10421047        break;
    10431048    }
    1044      
     1049
    10451050      /* If this is no TCP socket, ignore any options. */
    10461051      if ( sock->conn->type != NETCONN_TCP ) return 0;
     
    10501055      case TCP_KEEPALIVE:
    10511056        break;
    1052          
     1057
    10531058      default:
    10541059        LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", s, optname));
     
    10631068  }  /* switch */
    10641069
    1065    
     1070
    10661071  if( 0 != err ) {
    10671072    sock_set_errno(sock, err);
    10681073    return -1;
    10691074  }
    1070    
     1075
    10711076
    10721077
     
    10741079
    10751080  switch(level) {
    1076    
     1081
    10771082/* Level: SOL_SOCKET */
    10781083  case SOL_SOCKET:
     
    12431248    break;
    12441249
    1245 /* UNDEFINED LEVEL */     
     1250/* UNDEFINED LEVEL */
    12461251  default:
    12471252    LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", s, level, optname));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette