From e992ec3bfb75e338fd854cadf334c23b14af6286 Mon Sep 17 00:00:00 2001 From: flo Date: Thu, 30 Aug 2012 14:54:17 +0000 Subject: - update firefox and thunderbird to 15.0 - update firefox-esr, thunderbird-esr, linux-thunderbird and linux-firefox to 10.0.7 - update seamonkey and linux-seamonkey to 2.12 - update nss to 3.13.6 - update bsdipc code (posix_spawn, SysV shared memory) - rename patches to easily track those not (yet) submitted upstream - reduce package size, except for www/libxul[1] - restore default objdir to what it was in 13.0 - fix mail/enigmail after thunderbird build changes - don't accidentally pick up headers from installed ports[3] - add support for PREFIX != LOCALBASE to Makefile.webplugins [4] - document vulnerabilities in vuln.xml - *miscellaneous cleanups and fixups* Obtained from: OpenBSD ports[1] PR: ports/159831, ports/160933, ports/170467[3], ports/170236 [4] Submitted by: avilla [4] In collaboration with: Jan Beich Who did most of the hard work. --- .../nspr/files/patch-..::pr::src::pthreads::ptio.c | 46 --------- .../nspr/files/patch-.._pr_include_md__freebsd.cfg | 100 ------------------ devel/nspr/files/patch-.._pr_include_md__freebsd.h | 30 ------ devel/nspr/files/patch-.._pr_src_misc_prsystem.c | 22 ---- devel/nspr/files/patch-bug301986 | 35 +++++++ devel/nspr/files/patch-bug782109 | 31 ++++++ devel/nspr/files/patch-bug782111 | 35 +++++++ devel/nspr/files/patch-bug782113 | 113 +++++++++++++++++++++ devel/nspr/files/patch-bug782124 | 37 +++++++ devel/nspr/files/patch-bug782815 | 11 ++ devel/nspr/files/patch-pthread_t | 35 ------- devel/nspr/files/patch-warnings | 19 ++++ 12 files changed, 281 insertions(+), 233 deletions(-) delete mode 100644 devel/nspr/files/patch-..::pr::src::pthreads::ptio.c delete mode 100644 devel/nspr/files/patch-.._pr_include_md__freebsd.cfg delete mode 100644 devel/nspr/files/patch-.._pr_include_md__freebsd.h delete mode 100644 devel/nspr/files/patch-.._pr_src_misc_prsystem.c create mode 100644 devel/nspr/files/patch-bug301986 create mode 100644 devel/nspr/files/patch-bug782109 create mode 100644 devel/nspr/files/patch-bug782111 create mode 100644 devel/nspr/files/patch-bug782113 create mode 100644 devel/nspr/files/patch-bug782124 create mode 100644 devel/nspr/files/patch-bug782815 delete mode 100644 devel/nspr/files/patch-pthread_t (limited to 'devel') diff --git a/devel/nspr/files/patch-..::pr::src::pthreads::ptio.c b/devel/nspr/files/patch-..::pr::src::pthreads::ptio.c deleted file mode 100644 index 31a5645177d6..000000000000 --- a/devel/nspr/files/patch-..::pr::src::pthreads::ptio.c +++ /dev/null @@ -1,46 +0,0 @@ ---- ../pr/src/pthreads/ptio.c 2009-05-09 23:07:02.000000000 -0400 -+++ ../pr/src/pthreads/ptio.c 2009-11-04 15:24:47.000000000 -0500 -@@ -1168,7 +1168,7 @@ - osfd = socket(AF_INET6, SOCK_STREAM, 0); - if (osfd != -1) { - int on; -- int optlen = sizeof(on); -+ socklen_t optlen = sizeof(on); - if (getsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY, - &on, &optlen) == 0) { - _pr_ipv6_v6only_on_by_default = on; -@@ -3495,6 +3495,17 @@ - &on, sizeof(on)); - } - #endif -+#if (defined(_PR_INET6_PROBE) || defined(_PR_INET6)) && \ -+ defined(__FreeBSD__) && defined(IPV6_V6ONLY) -+ if (domain == PR_AF_INET6) { -+ int opt = 0; -+ if (setsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY, -+ &opt, sizeof(opt))) { -+ close(osfd); -+ return NULL; -+ } -+ } -+#endif - fd = pt_SetMethods(osfd, ftype, PR_FALSE, PR_FALSE); - if (fd == NULL) close(osfd); - } -@@ -3758,7 +3769,7 @@ - * We use these variables to figure out how much time has - * elapsed and how much of the timeout still remains. - */ -- PRIntervalTime start, elapsed, remaining; -+ PRIntervalTime start = 0, elapsed, remaining; - - if (pt_TestAbort()) return -1; - -@@ -4927,6 +4938,7 @@ - - if (timeout == PR_INTERVAL_NO_TIMEOUT) { - tvp = NULL; -+ start = 0; /* Not needed, but shuts down a warning */ - } else { - tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout); - tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds( diff --git a/devel/nspr/files/patch-.._pr_include_md__freebsd.cfg b/devel/nspr/files/patch-.._pr_include_md__freebsd.cfg deleted file mode 100644 index 93917808c5d4..000000000000 --- a/devel/nspr/files/patch-.._pr_include_md__freebsd.cfg +++ /dev/null @@ -1,100 +0,0 @@ ---- ../pr/include/md/_freebsd.cfg.orig 2007-11-26 19:17:17.000000000 +0100 -+++ ../pr/include/md/_freebsd.cfg 2010-06-09 20:30:03.000000000 +0200 -@@ -283,6 +283,97 @@ - #define PR_ALIGN_OF_POINTER 8 - #define PR_ALIGN_OF_WORD 8 - -+#elif defined(__powerpc64__) -+ -+#undef IS_LITTLE_ENDIAN -+#define IS_BIG_ENDIAN 1 -+#define IS_64 -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 8 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 8 -+#define PR_BYTES_PER_DWORD 8 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 64 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 64 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 6 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 6 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 8 -+#define PR_ALIGN_OF_INT64 8 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 8 -+#define PR_ALIGN_OF_POINTER 8 -+#define PR_ALIGN_OF_WORD 8 -+ -+#define PR_BYTES_PER_WORD_LOG2 3 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ -+#elif defined(__powerpc__) -+ -+#undef IS_LITTLE_ENDIAN -+#define IS_BIG_ENDIAN 1 -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 4 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 4 -+#define PR_BYTES_PER_DWORD 8 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 32 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 32 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 5 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 5 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 4 -+#define PR_ALIGN_OF_INT64 8 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 8 -+#define PR_ALIGN_OF_POINTER 4 -+#define PR_ALIGN_OF_WORD 4 -+ -+#define PR_BYTES_PER_WORD_LOG2 2 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ - #else - - #error "Unknown CPU architecture" diff --git a/devel/nspr/files/patch-.._pr_include_md__freebsd.h b/devel/nspr/files/patch-.._pr_include_md__freebsd.h deleted file mode 100644 index 610d1edeef59..000000000000 --- a/devel/nspr/files/patch-.._pr_include_md__freebsd.h +++ /dev/null @@ -1,30 +0,0 @@ ---- ../pr/include/md/_freebsd.h.orig 2004-11-22 21:24:53.000000000 +0000 -+++ ../pr/include/md/_freebsd.h 2010-06-07 20:53:33.000000000 +0000 -@@ -57,6 +57,10 @@ - #define _PR_SI_ARCHITECTURE "ia64" - #elif defined(__amd64__) - #define _PR_SI_ARCHITECTURE "amd64" -+#elif defined(__powerpc64__) -+#define _PR_SI_ARCHITECTURE "powerpc64" -+#elif defined(__powerpc__) -+#define _PR_SI_ARCHITECTURE "powerpc" - #else - #error "Unknown CPU architecture" - #endif -@@ -106,6 +110,16 @@ - #define _PR_IPV6_V6ONLY_PROBE - #endif - -+#if (__FreeBSD_version >= 700016) -+#if defined(_PR_PTHREADS) -+#define _PR_HAVE_GETPROTO_R -+#define _PR_HAVE_5_ARG_GETPROTO_R -+#define _PR_HAVE_GETHOST_R -+#define _PR_HAVE_GETHOST_R_INT -+#define _PR_HAVE_THREADSAFE_GETHOST -+#endif -+#endif -+ - #define USE_SETJMP - - #ifndef _PR_PTHREADS diff --git a/devel/nspr/files/patch-.._pr_src_misc_prsystem.c b/devel/nspr/files/patch-.._pr_src_misc_prsystem.c deleted file mode 100644 index a73a823f40b5..000000000000 --- a/devel/nspr/files/patch-.._pr_src_misc_prsystem.c +++ /dev/null @@ -1,22 +0,0 @@ ---- ../pr/src/misc/prsystem.c.orig Fri May 6 20:35:58 2005 -+++ ../pr/src/misc/prsystem.c Sun Dec 4 22:09:51 2005 -@@ -352,6 +352,19 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem - odm_terminate(); - } - -+#elif defined(__FreeBSD__) -+ -+ int mib[2]; -+ unsigned long physmem; -+ size_t len; -+ -+ mib[0] = CTL_HW; -+ mib[1] = HW_PHYSMEM; -+ len = sizeof(physmem); -+ if(sysctl(mib, 2, &physmem, &len, NULL, 0) == 0 -+ && len == sizeof(physmem)) -+ bytes = physmem; -+ - #else - - PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); diff --git a/devel/nspr/files/patch-bug301986 b/devel/nspr/files/patch-bug301986 new file mode 100644 index 000000000000..e763d64cecd2 --- /dev/null +++ b/devel/nspr/files/patch-bug301986 @@ -0,0 +1,35 @@ +pthread_t can well be a 64-bit value -- on FreeBSD/amd64, for example. +Better to just keep calling it pthread_t isntead of casting to anything. + + -mi + +--- ../pr/include/private/pprthred.h Sun Apr 25 11:00:56 2004 ++++ ../pr/include/private/pprthred.h Tue Jul 12 00:52:42 2005 +@@ -44,4 +44,5 @@ + */ + #include "nspr.h" ++#include + + #if defined(XP_OS2) +@@ -92,5 +92,5 @@ + ** when it is created or attached. + */ +-NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread); ++NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread); + + /* +--- ../pr/src/pthreads/ptthread.c Wed May 25 22:27:51 2005 ++++ ../pr/src/pthreads/ptthread.c Tue Jul 12 00:49:50 2005 +@@ -979,10 +979,10 @@ + } + +-PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred) ++PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred) + { + #if defined(_PR_DCETHREADS) + return (PRUint32)&thred->id; /* this is really a sham! */ + #else +- return (PRUint32)thred->id; /* and I don't know what they will do with it */ ++ return thred->id; /* and I don't know what they will do with it */ + #endif + } diff --git a/devel/nspr/files/patch-bug782109 b/devel/nspr/files/patch-bug782109 new file mode 100644 index 000000000000..7bd8b34115ec --- /dev/null +++ b/devel/nspr/files/patch-bug782109 @@ -0,0 +1,31 @@ +--- ../pr/include/md/_freebsd.h~ ++++ ../pr/include/md/_freebsd.h +@@ -47,6 +47,14 @@ + #define _PR_HAVE_LARGE_OFF_T + + #if defined(_PR_PTHREADS) ++#if __FreeBSD_version >= 602000 ++#define _PR_HAVE_GETPROTO_R ++#define _PR_HAVE_5_ARG_GETPROTO_R ++#endif ++#if __FreeBSD_version >= 700016 ++#define _PR_HAVE_GETHOST_R ++#define _PR_HAVE_GETHOST_R_INT ++#endif + #if __FreeBSD_version >= 400008 + /* + * libc_r before this version of FreeBSD doesn't have poll(). +--- ../pr/src/misc/prnetdb.c ++++ ../pr/src/misc/prnetdb.c +@@ -78,11 +78,6 @@ PRLock *_pr_dnsLock = NULL; + #define _PR_HAVE_GETPROTO_R_INT + #endif + +-#if __FreeBSD_version >= 602000 +-#define _PR_HAVE_GETPROTO_R +-#define _PR_HAVE_5_ARG_GETPROTO_R +-#endif +- + /* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */ + #if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS)) + #define _PR_HAVE_GETPROTO_R diff --git a/devel/nspr/files/patch-bug782111 b/devel/nspr/files/patch-bug782111 new file mode 100644 index 000000000000..cddbcfd5541c --- /dev/null +++ b/devel/nspr/files/patch-bug782111 @@ -0,0 +1,35 @@ +--- ../pr/src/pthreads/ptthread.c ++++ ../pr/src/pthreads/ptthread.c +@@ -21,6 +21,10 @@ + #include + #include + ++#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) ++#include ++#endif ++ + #ifdef SYMBIAN + /* In Open C sched_get_priority_min/max do not work properly, so we undefine + * _POSIX_THREAD_PRIORITY_SCHEDULING here. +@@ -1619,7 +1623,7 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name) + { + PRThread *thread; + size_t nameLen; +- int result; ++ int result = 0; + + if (!name) { + PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); +@@ -1637,8 +1641,10 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name) + return PR_FAILURE; + memcpy(thread->name, name, nameLen + 1); + +-#if defined(OPENBSD) || defined(FREEBSD) +- result = pthread_set_name_np(thread->id, name); ++#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) ++ pthread_set_name_np(thread->id, name); ++#elif defined(NETBSD) ++ pthread_setname_np(thread->id, "%s", name); + #else /* not BSD */ + /* + * On OSX, pthread_setname_np is only available in 10.6 or later, so test diff --git a/devel/nspr/files/patch-bug782113 b/devel/nspr/files/patch-bug782113 new file mode 100644 index 000000000000..77a8b4bf30ed --- /dev/null +++ b/devel/nspr/files/patch-bug782113 @@ -0,0 +1,113 @@ +--- ../pr/include/md/_freebsd.cfg ++++ ../pr/include/md/_freebsd.cfg +@@ -251,6 +251,97 @@ + #define PR_ALIGN_OF_POINTER 8 + #define PR_ALIGN_OF_WORD 8 + ++#elif defined(__powerpc64__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__powerpc__) ++ ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" +--- ../pr/include/md/_freebsd.h ++++ ../pr/include/md/_freebsd.h +@@ -25,6 +25,10 @@ + #define _PR_SI_ARCHITECTURE "ia64" + #elif defined(__amd64__) + #define _PR_SI_ARCHITECTURE "amd64" ++#elif defined(__powerpc64__) ++#define _PR_SI_ARCHITECTURE "powerpc64" ++#elif defined(__powerpc__) ++#define _PR_SI_ARCHITECTURE "powerpc" + #else + #error "Unknown CPU architecture" + #endif diff --git a/devel/nspr/files/patch-bug782124 b/devel/nspr/files/patch-bug782124 new file mode 100644 index 000000000000..3f24011274d7 --- /dev/null +++ b/devel/nspr/files/patch-bug782124 @@ -0,0 +1,37 @@ +--- ../pr/src/misc/prsystem.c~ ++++ ../pr/src/misc/prsystem.c +@@ -24,7 +24,7 @@ + + /* BSD-derived systems use sysctl() to get the number of processors */ + #if defined(BSDI) || defined(FREEBSD) || defined(NETBSD) \ +- || defined(OPENBSD) || defined(DARWIN) ++ || defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN) + #define _PR_HAVE_SYSCTL + #include + #include +@@ -292,15 +292,23 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void) + if (pageSize >= 0 && pageCount >= 0) + bytes = (PRUint64) pageSize * pageCount; + +-#elif defined(NETBSD) || defined(OPENBSD) +- ++#elif defined(NETBSD) || defined(OPENBSD) \ ++ || defined(FREEBSD) || defined(DRAGONFLY) + int mib[2]; + int rc; ++#ifdef HW_PHYSMEM64 + uint64_t memSize; ++#else ++ unsigned long memSize; ++#endif + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; ++#ifdef HW_PHYSMEM64 + mib[1] = HW_PHYSMEM64; ++#else ++ mib[1] = HW_PHYSMEM; ++#endif + rc = sysctl(mib, 2, &memSize, &len, NULL, 0); + if (-1 != rc) { + bytes = memSize; diff --git a/devel/nspr/files/patch-bug782815 b/devel/nspr/files/patch-bug782815 new file mode 100644 index 000000000000..cb04122833ce --- /dev/null +++ b/devel/nspr/files/patch-bug782815 @@ -0,0 +1,11 @@ +--- ../pr/src/pthreads/ptio.c~ ++++ ../pr/src/pthreads/ptio.c +@@ -1150,7 +1150,7 @@ void _PR_InitIO(void) + osfd = socket(AF_INET6, SOCK_STREAM, 0); + if (osfd != -1) { + int on; +- int optlen = sizeof(on); ++ socklen_t optlen = sizeof(on); + if (getsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY, + &on, &optlen) == 0) { + _pr_ipv6_v6only_on_by_default = on; diff --git a/devel/nspr/files/patch-pthread_t b/devel/nspr/files/patch-pthread_t deleted file mode 100644 index e763d64cecd2..000000000000 --- a/devel/nspr/files/patch-pthread_t +++ /dev/null @@ -1,35 +0,0 @@ -pthread_t can well be a 64-bit value -- on FreeBSD/amd64, for example. -Better to just keep calling it pthread_t isntead of casting to anything. - - -mi - ---- ../pr/include/private/pprthred.h Sun Apr 25 11:00:56 2004 -+++ ../pr/include/private/pprthred.h Tue Jul 12 00:52:42 2005 -@@ -44,4 +44,5 @@ - */ - #include "nspr.h" -+#include - - #if defined(XP_OS2) -@@ -92,5 +92,5 @@ - ** when it is created or attached. - */ --NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread); -+NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread); - - /* ---- ../pr/src/pthreads/ptthread.c Wed May 25 22:27:51 2005 -+++ ../pr/src/pthreads/ptthread.c Tue Jul 12 00:49:50 2005 -@@ -979,10 +979,10 @@ - } - --PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred) -+PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred) - { - #if defined(_PR_DCETHREADS) - return (PRUint32)&thred->id; /* this is really a sham! */ - #else -- return (PRUint32)thred->id; /* and I don't know what they will do with it */ -+ return thred->id; /* and I don't know what they will do with it */ - #endif - } diff --git a/devel/nspr/files/patch-warnings b/devel/nspr/files/patch-warnings index 3a89f86e1aed..571421fba5e3 100644 --- a/devel/nspr/files/patch-warnings +++ b/devel/nspr/files/patch-warnings @@ -1,3 +1,22 @@ +--- ../pr/src/pthreads/ptio.c 2009-05-09 23:07:02.000000000 -0400 ++++ ../pr/src/pthreads/ptio.c 2009-11-04 15:24:47.000000000 -0500 +@@ -3758,7 +3769,7 @@ + * We use these variables to figure out how much time has + * elapsed and how much of the timeout still remains. + */ +- PRIntervalTime start, elapsed, remaining; ++ PRIntervalTime start = 0, elapsed, remaining; + + if (pt_TestAbort()) return -1; + +@@ -4927,6 +4938,7 @@ + + if (timeout == PR_INTERVAL_NO_TIMEOUT) { + tvp = NULL; ++ start = 0; /* Not needed, but shuts down a warning */ + } else { + tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout); + tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds( --- ../pr/src/pthreads/ptsynch.c Mon Nov 22 16:24:53 2004 +++ ../pr/src/pthreads/ptsynch.c Mon Jul 25 00:03:49 2005 @@ -63,5 +63,5 @@ -- cgit