VirtualBox

Changeset 4634 in vbox for trunk/src


Ignore:
Timestamp:
Sep 9, 2007 6:13:29 AM (17 years ago)
Author:
vboxsync
Message:

Don't use TCPV40HDRS.

Location:
trunk/src/libs/xpcom18a4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r4628 r4634  
    5050TEMPLATE_XPCOM_DEFS.linux          = OSTYPE=\"Linux2.6\"    OSARCH=\"Linux\"  XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1
    5151TEMPLATE_XPCOM_DEFS.l4             = OSTYPE=\"L4ENV\"       OSARCH=\"L4\"     XP_UNIX=1 L4ENV HAVE_VISIBILITY_ATTRIBUTE=1
    52 TEMPLATE_XPCOM_DEFS.os2            = OSTYPE=\"OS/2_4.5\"    OSARCH=\"OS/2\"   XP_OS2 XP_PC BSD_SELECT TCPV40HDRS
    53 TEMPLATE_XPCOM_LIBPATH.os2         = $(PATH_EMXPGCC)/lib/tcpipv4
     52TEMPLATE_XPCOM_DEFS.os2            = OSTYPE=\"OS/2_4.5\"    OSARCH=\"OS/2\"   XP_OS2 XP_PC BSD_SELECT
    5453TEMPLATE_XPCOM_LDFLAGS.darwin      = $(VBOXR3NP_LDFLAGS.darwin) \
    5554                                     -fshort-wchar -fno-rtti -fno-exceptions -fpascal-strings \
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_os2.h

    r3368 r4634  
    9292#define _PR_HAVE_THREADSAFE_GETHOST
    9393#define _PR_HAVE_ATOMIC_OPS
     94#ifndef TCPV40HDRS                      /* bird */
     95#define _PR_HAVE_SOCKADDR_LEN           /* bird */
     96#endif                                  /* bird */
    9497
    9598#define HANDLE unsigned long
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/os2/os2sock.c

    r3368 r4634  
    310310    }
    311311done:
     312#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     313    if (rv != -1 && addr) /* ignore the sa_len field of struct sockaddr */
     314        addr->raw.family = ((struct sockaddr *) addr)->sa_family;
     315#endif /* _PR_HAVE_SOCKADDR_LEN */
    312316    return(rv);
    313317}
     
    320324    PRThread *me = _PR_MD_CURRENT_THREAD();
    321325    PRInt32 osfd = fd->secret->md.osfd;
     326#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     327    PRNetAddr addrCopy = *addr;
     328    ((struct sockaddr *)&addrCopy)->sa_len = addrlen;
     329    ((struct sockaddr *)&addrCopy)->sa_family = addr->raw.family;
     330    addr = &addrCopy;
     331#endif
    322332
    323333     /*
     
    382392{
    383393    PRInt32 rv, err;
     394#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     395    PRNetAddr addrCopy = *addr;
     396    ((struct sockaddr *)&addrCopy)->sa_len = addrlen;
     397    ((struct sockaddr *)&addrCopy)->sa_family = addr->raw.family;
     398    addr = &addrCopy;
     399#endif
    384400    rv = bind(fd->secret->md.osfd, (struct sockaddr *) addr, (int )addrlen);
    385401    if (rv < 0) {
     
    485501    PRInt32 rv, err;
    486502    PRThread *me = _PR_MD_CURRENT_THREAD();
     503#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     504    PRNetAddr addrCopy = *addr;
     505    ((struct sockaddr *)&addrCopy)->sa_len = addrlen;
     506    ((struct sockaddr *)&addrCopy)->sa_family = addr->raw.family;
     507    addr = &addrCopy;
     508#endif
    487509    while ((rv = sendto(osfd, buf, amount, flags,
    488510           (struct sockaddr *) addr, addrlen)) == -1)
     
    538560    }
    539561done:
     562#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     563    if (rv != -1 && addr) /* ignore the sa_len field of struct sockaddr */
     564        addr->raw.family = ((struct sockaddr *) addr)->sa_family;
     565#endif /* _PR_HAVE_SOCKADDR_LEN */
    540566    return(rv);
    541567}
     
    630656    rv = getsockname(fd->secret->md.osfd,
    631657                     (struct sockaddr *) addr, (int *)addrlen);
     658#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     659    if (rv == 0 && addr) /* ignore the sa_len field of struct sockaddr */
     660        addr->raw.family = ((struct sockaddr *) addr)->sa_family;
     661#endif /* _PR_HAVE_SOCKADDR_LEN */
    632662    if (rv < 0) {
    633663        err = sock_errno();
     
    644674    rv = getpeername(fd->secret->md.osfd,
    645675                     (struct sockaddr *) addr, (int *)addrlen);
     676#ifdef _PR_HAVE_SOCKADDR_LEN /* bird - !TCPV40HDRS */
     677    if (rv == 0 && addr) /* ignore the sa_len field of struct sockaddr */
     678        addr->raw.family = ((struct sockaddr *) addr)->sa_family;
     679#endif /* _PR_HAVE_SOCKADDR_LEN */
    646680    if (rv < 0) {
    647681        err = sock_errno();
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