AIX doesn't have cthreads :) seriously, we need to mask the raw.family by 0x00ff to get at the real family of the sockaddr_in. this will probably break i386 rhapsody. we can fix it once we have someone working on it. RHAPSODY_NSPR_BRANCH
authortoshok
Tue, 05 May 1998 12:14:20 +0000
branchRHAPSODY_NSPR_BRANCH
changeset 86 bef6897e5413613522f0bef600844f7563b91933
parent 85 f025b6287a638f90385865ace7a3468465f360d2
child 87 e5d8e228958ccef054d331d73642d1a6a9295c19
push idunknown
push userunknown
push dateunknown
AIX doesn't have cthreads :) seriously, we need to mask the raw.family by 0x00ff to get at the real family of the sockaddr_in. this will probably break i386 rhapsody. we can fix it once we have someone working on it.
pr/src/cthreads/ctio.c
--- a/pr/src/cthreads/ctio.c
+++ b/pr/src/cthreads/ctio.c
@@ -1233,17 +1233,17 @@ static PRFileDesc* ct_Accept(
                 op.function = ct_accect_cont;
                 op.event = POLLIN | POLLPRI;
                 osfd = ct_Continue(&op);
                 syserrno = op.syserrno;
             }
             if (osfd < 0) goto failed;
         }
     }
-#ifdef AIX
+#ifdef RHAPSODY
     /* mask off the first byte of struct sockaddr (the length field) */
     if (addr)
     addr->inet.family &= 0x00ff;
 #endif
     newfd = ct_SetMethods(osfd, PR_DESC_SOCKET_TCP);
     if (newfd == NULL)
     {
         close(osfd);  /* $$$ whoops! this doesn't work $$$ */
@@ -1490,17 +1490,17 @@ static PRInt32 ct_RecvFrom(PRFileDesc *f
         op.arg4.flags = flags;
         op.arg5.addr = addr;
         op.timeout = timeout;
         op.function = ct_recvfrom_cont;
         op.event = POLLIN | POLLPRI;
         bytes = ct_Continue(&op);
         syserrno = op.syserrno;
     }
-#ifdef AIX
+#ifdef RHAPSODY
     /* mask off the first byte of struct sockaddr (the length field) */
     if (addr) addr->inet.family &= 0x00ff;
 #endif
     if (bytes < 0)
         ct_MapError(_PR_MD_MAP_RECVFROM_ERROR, syserrno);
     return bytes;
 }  /* ct_RecvFrom */
 
@@ -1560,17 +1560,17 @@ failed:
 static PRStatus ct_GetSockName(PRFileDesc *fd, PRNetAddr *addr)
 {
     PRIntn rv = -1, addr_len = sizeof(PRNetAddr);
 
     if (ct_TestAbort()) return PR_FAILURE;
 
     rv = getsockname(
         fd->secret->md.osfd, (struct sockaddr*)addr, &addr_len);
-#ifdef AIX
+#ifdef RHAPSODY
     /* mask off the first byte of struct sockaddr (the length field) */
     if (addr) addr->inet.family &= 0x00ff;
 #endif
     if (rv == -1) {
         ct_MapError(_PR_MD_MAP_GETSOCKNAME_ERROR, errno);
         return PR_FAILURE;
     } else {
         PR_ASSERT(addr_len == PR_NETADDR_SIZE(addr));
@@ -1587,17 +1587,17 @@ static PRStatus ct_GetPeerName(PRFileDes
 {
     PRIntn rv = -1, addr_len = sizeof(PRNetAddr);
 
     if (ct_TestAbort()) return PR_FAILURE;
 
     rv = getpeername(
         fd->secret->md.osfd, (struct sockaddr*)addr, &addr_len);
 
-#ifdef AIX
+#ifdef RHAPSODY
     /* mask off the first byte of struct sockaddr (the length field) */
     if (addr) addr->inet.family &= 0x00ff;
 #endif
     if (rv == -1) {
         ct_MapError(_PR_MD_MAP_GETPEERNAME_ERROR, errno);
         return PR_FAILURE;
     } else {
         PR_ASSERT(addr_len == PR_NETADDR_SIZE(addr));