~ubuntu-branches/ubuntu/quantal/nspr/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/src/pthreads/ptio.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-08-10 11:34:26 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810113426-3uv4diflrkcbdimm
Tags: 4.8-0ubuntu1
* New upstream release: 4.8 (LP: #387812)
* adjust patches to changed upstreanm codebase
  - update debian/patches/99_configure.patch
* update shlibs symbols to include new API elements
  - update debian/libnspr4-0d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
    || defined(HPUX10_30) || defined(HPUX11) \
212
212
    || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
213
213
    || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
214
 
    || defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) \
 
214
    || defined(BSDI) || defined(NTO) || defined(DARWIN) \
215
215
    || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
216
216
#define _PRSelectFdSetArg_t fd_set *
217
217
#else
295
295
#if defined(HAVE_SOCKLEN_T) \
296
296
    || (defined(__GLIBC__) && __GLIBC__ >= 2)
297
297
typedef socklen_t pt_SockLen;
298
 
#elif (defined(AIX) && !defined(AIX4_1)) \
299
 
    || defined(VMS)
 
298
#elif (defined(AIX) && !defined(AIX4_1)) 
300
299
typedef PRSize pt_SockLen;
301
300
#else
302
301
typedef PRIntn pt_SockLen;
2097
2096
        bytes = pt_Continue(&op);
2098
2097
        syserrno = op.syserrno;
2099
2098
    }
2100
 
#ifdef _PR_HAVE_SOCKADDR_LEN
2101
2099
    if (bytes >= 0)
2102
2100
    {
 
2101
#ifdef _PR_HAVE_SOCKADDR_LEN
2103
2102
        /* ignore the sa_len field of struct sockaddr */
2104
2103
        if (addr)
2105
2104
        {
2106
2105
            addr->raw.family = ((struct sockaddr*)addr)->sa_family;
2107
2106
        }
2108
 
    }
2109
2107
#endif /* _PR_HAVE_SOCKADDR_LEN */
2110
2108
#ifdef _PR_INET6
2111
 
        if (addr && (AF_INET6 == addr->raw.family))
2112
 
        addr->raw.family = PR_AF_INET6;
 
2109
        if (addr && (AF_INET6 == addr->raw.family))
 
2110
            addr->raw.family = PR_AF_INET6;
2113
2111
#endif
2114
 
    if (bytes < 0)
 
2112
    }
 
2113
    else
2115
2114
        pt_MapError(_PR_MD_MAP_RECVFROM_ERROR, syserrno);
2116
2115
    return bytes;
2117
2116
}  /* pt_RecvFrom */
3270
3269
#if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \
3271
3270
    || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
3272
3271
    || defined(AIX) || defined(FREEBSD) || defined(NETBSD) \
3273
 
    || defined(OPENBSD) || defined(BSDI) || defined(VMS) || defined(NTO) \
 
3272
    || defined(OPENBSD) || defined(BSDI) || defined(NTO) \
3274
3273
    || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) \
3275
3274
    || defined(SYMBIAN)
3276
3275
#define _PR_FCNTL_FLAGS O_NONBLOCK
4704
4703
 
4705
4704
PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void)
4706
4705
{
4707
 
#if defined(AIX) || defined(VMS) || defined(SYMBIAN)
 
4706
#if defined(AIX) || defined(SYMBIAN)
4708
4707
    return sysconf(_SC_OPEN_MAX);
4709
4708
#else
4710
4709
    struct rlimit rlim;
4718
4717
 
4719
4718
PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(PRIntn table_size)
4720
4719
{
4721
 
#if defined(AIX) || defined(VMS) || defined(SYMBIAN)
 
4720
#if defined(AIX) || defined(SYMBIAN)
4722
4721
    return -1;
4723
4722
#else
4724
4723
    struct rlimit rlim;