- Timestamp:
- Sep 9, 2007 6:13:29 AM (17 years ago)
- Location:
- trunk/src/libs/xpcom18a4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/Makefile.kmk
r4628 r4634 50 50 TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1 51 51 TEMPLATE_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 52 TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2_4.5\" OSARCH=\"OS/2\" XP_OS2 XP_PC BSD_SELECT 54 53 TEMPLATE_XPCOM_LDFLAGS.darwin = $(VBOXR3NP_LDFLAGS.darwin) \ 55 54 -fshort-wchar -fno-rtti -fno-exceptions -fpascal-strings \ -
trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_os2.h
r3368 r4634 92 92 #define _PR_HAVE_THREADSAFE_GETHOST 93 93 #define _PR_HAVE_ATOMIC_OPS 94 #ifndef TCPV40HDRS /* bird */ 95 #define _PR_HAVE_SOCKADDR_LEN /* bird */ 96 #endif /* bird */ 94 97 95 98 #define HANDLE unsigned long -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/os2/os2sock.c
r3368 r4634 310 310 } 311 311 done: 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 */ 312 316 return(rv); 313 317 } … … 320 324 PRThread *me = _PR_MD_CURRENT_THREAD(); 321 325 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 322 332 323 333 /* … … 382 392 { 383 393 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 384 400 rv = bind(fd->secret->md.osfd, (struct sockaddr *) addr, (int )addrlen); 385 401 if (rv < 0) { … … 485 501 PRInt32 rv, err; 486 502 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 487 509 while ((rv = sendto(osfd, buf, amount, flags, 488 510 (struct sockaddr *) addr, addrlen)) == -1) … … 538 560 } 539 561 done: 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 */ 540 566 return(rv); 541 567 } … … 630 656 rv = getsockname(fd->secret->md.osfd, 631 657 (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 */ 632 662 if (rv < 0) { 633 663 err = sock_errno(); … … 644 674 rv = getpeername(fd->secret->md.osfd, 645 675 (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 */ 646 680 if (rv < 0) { 647 681 err = sock_errno();
Note:
See TracChangeset
for help on using the changeset viewer.