[Glibc-bsd-commits] r1671 - trunk/web/patches/mozilla

Petr Salinger ps-guest at costa.debian.org
Mon Oct 9 18:37:51 UTC 2006


Author: ps-guest
Date: 2006-10-09 18:37:51 +0000 (Mon, 09 Oct 2006)
New Revision: 1671

Added:
   trunk/web/patches/mozilla/main.diff
   trunk/web/patches/mozilla/nsprpub.diff
   trunk/web/patches/mozilla/nsprpub2.diff
Removed:
   trunk/web/patches/mozilla/trunk/
Log:

* update mozilla patches



Copied: trunk/web/patches/mozilla/main.diff (from rev 1670, trunk/web/patches/mozilla/trunk/main.diff)
===================================================================
--- trunk/web/patches/mozilla/main.diff	                        (rev 0)
+++ trunk/web/patches/mozilla/main.diff	2006-10-09 18:37:51 UTC (rev 1671)
@@ -0,0 +1,436 @@
+
+Author: rmh, petr
+Recipe:
+  - checkout firefox ("browser" variable)
+  - mkdir build && cd build && ../mozilla/configure --enable-application=browser && make
+
+Status: forward ported from working xulrunner 1.8.0.7
+	https://bugzilla.mozilla.org/show_bug.cgi?id=356011
+
+Index: configure.in
+===================================================================
+RCS file: /cvsroot/mozilla/configure.in,v
+retrieving revision 1.1732
+diff -u -r1.1732 configure.in
+--- configure.in	3 Oct 2006 01:16:27 -0000	1.1732
++++ configure.in	9 Oct 2006 11:21:31 -0000
+@@ -885,6 +885,7 @@
+     OS_TEST="${target_cpu}"
+     case "${target_os}" in
+         linux*)       OS_ARCH=Linux ;;
++        kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD ;;
+         solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
+         mingw*)       OS_ARCH=WINNT ;;
+         wince*)       OS_ARCH=WINCE ;;
+@@ -1342,7 +1343,7 @@
+     LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc'
+     ;;
+ 
+-*-linux*)
++*-linux*|*-kfreebsd*-gnu)
+     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
+     HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
+     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
+@@ -2316,7 +2317,7 @@
+ dnl = Flags to strip unused symbols from .so components
+ dnl ========================================================
+ case "$target" in
+-    *-linux*)
++    *-linux*|*-kfreebsd*-gnu)
+         MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
+         ;;
+     *-solaris*)
+@@ -2960,7 +2961,7 @@
+ 			fi
+ 			;;
+ 
+-	    *-*-linux*) 
++	    *-*-linux*|*-*-kfreebsd*-gnu) 
+ 			AC_DEFINE(_REENTRANT) 
+ 			;;
+ 
+Index: directory/c-sdk/ldap/include/portable.h
+===================================================================
+RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/include/portable.h,v
+retrieving revision 5.15
+diff -u -r5.15 portable.h
+--- directory/c-sdk/ldap/include/portable.h	3 Oct 2006 20:43:40 -0000	5.15
++++ directory/c-sdk/ldap/include/portable.h	9 Oct 2006 11:21:57 -0000
+@@ -122,7 +122,7 @@
+  * some systems don't have the BSD re_comp and re_exec routines
+  */
+ #ifndef NEED_BSDREGEX
+-#if ( defined( SYSV ) || defined( NETBSD ) || defined( freebsd ) || defined( linux ) || defined( DARWIN )) && !defined(sgi)
++#if ( defined( SYSV ) || defined( NETBSD ) || defined( freebsd ) || defined( linux ) || defined(__GNU__) || defined(__GLIBC__) || defined( DARWIN )) && !defined(sgi)
+ #define NEED_BSDREGEX
+ #endif
+ #endif
+@@ -151,7 +151,7 @@
+  * Is snprintf() part of the standard C runtime library?
+  */
+ #if !defined(HAVE_SNPRINTF)
+-#if defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined(AIX)
++#if defined(SOLARIS) || defined(LINUX) || defined(HPUX) || defined(AIX) || defined(__GNU__) || defined(__GLIBC__)
+ #define HAVE_SNPRINTF
+ #endif
+ #if defined(_WINDOWS)
+@@ -175,7 +175,7 @@
+  * for select()
+  */
+ #if !defined(WINSOCK) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2)
+-#if defined(hpux) || defined(LINUX) || defined(SUNOS4) || defined(XP_BEOS)
++#if defined(hpux) || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) || defined(SUNOS4) || defined(XP_BEOS)
+ #include <sys/time.h>
+ #else
+ #include <sys/select.h>
+@@ -247,15 +247,14 @@
+ #define HAVE_TIME_R
+ #endif
+ 
+-#if defined(SNI) || defined(LINUX1_2)
++#if defined(SNI) || defined(LINUX1_2) || defined(__GNU__) || defined(__GLIBC__)
+ int strcasecmp(const char *, const char *);
+ #ifdef SNI
+ int strncasecmp(const char *, const char *, int);
+-#endif /* SNI */
+-#ifdef LINUX1_2
++#else /* SNI */
+ int strncasecmp(const char *, const char *, size_t);
+-#endif /* LINUX1_2 */
+-#endif /* SNI || LINUX1_2 */
++#endif
++#endif /* SNI || LINUX1_2 || __GNU__ || __GLIBC__ */
+ 
+ #if defined(_WINDOWS) || defined(macintosh) || defined(XP_OS2) || defined(DARWIN)
+ #define GETHOSTBYNAME( n, r, b, l, e )  gethostbyname( n )
+@@ -295,7 +294,7 @@
+ #elif defined(HPUX10)
+ #define GETHOSTBYNAME_BUF_T struct hostent_data
+ #define GETHOSTBYNAME( n, r, b, l, e )	nsldapi_compat_gethostbyname_r( n, r, (char *)&b, l, e )
+-#elif defined(LINUX)
++#elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
+ typedef char GETHOSTBYNAME_buf_t [NSLDAPI_NETDB_BUF_SIZE];
+ #define GETHOSTBYNAME_BUF_T GETHOSTBYNAME_buf_t
+ #define GETHOSTBYNAME( n, r, b, l, rp, e )  gethostbyname_r( n, r, b, l, rp, e )
+@@ -306,7 +305,7 @@
+ #define GETHOSTBYNAME( n, r, b, l, e )  gethostbyname_r( n, r, b, l, e )
+ #endif
+ #if defined(HPUX9) || defined(LINUX1_2) || defined(LINUX2_0) || \
+-    defined(LINUX2_1) || defined(SUNOS4) || defined(SNI) || \
++    defined(LINUX2_1) || defined(__GNU__) || defined(__GLIBC__) || defined(SUNOS4) || defined(SNI) || \
+     defined(SCOOS) || defined(BSDI) || defined(NCR) || \
+     defined(NEC) || ( defined(HPUX10) && !defined(_REENTRANT)) || \
+     (defined(AIX) && !defined(USE_REENTRANT_LIBC))
+Index: directory/c-sdk/ldap/libraries/libldap/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in,v
+retrieving revision 5.19
+diff -u -r5.19 Makefile.in
+--- directory/c-sdk/ldap/libraries/libldap/Makefile.in	3 Oct 2006 20:43:41 -0000	5.19
++++ directory/c-sdk/ldap/libraries/libldap/Makefile.in	9 Oct 2006 11:21:57 -0000
+@@ -196,7 +196,7 @@
+ EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) $(OS_LIBS) -lc
+ endif
+ 
+-ifeq ($(OS_ARCH), Linux)
++ifneq (,$(filter Linux GNU GNU_%, $(OS_ARCH)))
+ EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) $(SASL_LINK)
+ endif
+ 
+@@ -314,7 +314,7 @@
+ ifdef SO_FILES_TO_REMOVE
+ 	-$(RM) $(SO_FILES_TO_REMOVE)
+ endif
+-ifneq (,$(filter AIX Linux HP-UX Darwin BeOS QNX NetBSD OSF1 OpenBSD, $(OS_ARCH)))
++ifneq (,$(filter AIX Linux GNU GNU_% HP-UX Darwin BeOS QNX NetBSD OSF1 OpenBSD, $(OS_ARCH)))
+ 	$(LINK_LIB)
+ else
+ ifeq ($(OS_ARCH),OS2)
+Index: directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c
+===================================================================
+RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c,v
+retrieving revision 5.7
+diff -u -r5.7 ldappr-error.c
+--- directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c	15 Mar 2004 06:25:32 -0000	5.7
++++ directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c	9 Oct 2006 11:21:58 -0000
+@@ -233,7 +233,7 @@
+ 
+ #if defined(__hpux) || defined(_AIX) || defined(OSF1) || defined(DARWIN) || \
+   defined(BEOS) || defined(FREEBSD) || defined(BSDI) || defined(VMS) || \
+-  defined(OPENBSD) || defined(NETBSD)
++  defined(OPENBSD) || defined(NETBSD) || defined(__FreeBSD_kernel__)
+ #define EDEADLOCK       -1
+ #endif
+ 
+Index: security/coreconf/Linux.mk
+===================================================================
+RCS file: /cvsroot/mozilla/security/coreconf/Linux.mk,v
+retrieving revision 1.29
+diff -u -r1.29 Linux.mk
+--- security/coreconf/Linux.mk	24 Apr 2006 20:07:15 -0000	1.29
++++ security/coreconf/Linux.mk	9 Oct 2006 11:23:51 -0000
+@@ -52,72 +52,49 @@
+ 
+ DEFAULT_COMPILER = gcc
+ 
+-ifeq ($(OS_TEST),m68k)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= m68k
+-else
++CPU_ARCH      = $(OS_TEST)
++
++ifeq ($(KERNEL),linux)
++	OS_REL_CFLAGS   = -D_XOPEN_SOURCE -DLINUX1_2
++	ARCH            = linux
++else 
++	OS_REL_CFLAGS   = -D_XOPEN_SOURCE
++	ARCH            = gnu
++endif
++
++
+ ifeq ($(OS_TEST),ppc64)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+ 	CPU_ARCH	= ppc
+ ifeq ($(USE_64),1)
+ 	ARCHFLAG	= -m64
+ endif
+ else
+-ifeq ($(OS_TEST),ppc)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= ppc
+-else
+ ifeq ($(OS_TEST),alpha)
+-        OS_REL_CFLAGS   = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= alpha
+-else
+-ifeq ($(OS_TEST),ia64)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= ia64
++        OS_REL_CFLAGS   += -D_ALPHA_
+ else
+ ifeq ($(OS_TEST),x86_64)
+ ifeq ($(USE_64),1)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+ 	CPU_ARCH	= x86_64
+ else
+-	OS_REL_CFLAGS	= -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
++	OS_REL_CFLAGS	+= -Di386
+ 	CPU_ARCH	= x86
+ 	ARCHFLAG	= -m32
+ endif
+ else
+-ifeq ($(OS_TEST),sparc)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = sparc
+-else
+ ifeq ($(OS_TEST),sparc64)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+ 	CPU_ARCH        = sparc
+ else
+ ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+ 	CPU_ARCH        = arm
+ else
+ ifeq ($(OS_TEST),parisc)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+ 	CPU_ARCH        = hppa
+ else
+ ifeq ($(OS_TEST),parisc64)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+ 	CPU_ARCH        = hppa
+ else
+-ifeq ($(OS_TEST),s390)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = s390
+-else
+-ifeq ($(OS_TEST),s390x)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = s390x
+-else
+-ifeq ($(OS_TEST),mips)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = mips
+-else
+-	OS_REL_CFLAGS	= -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
++ifeq (,$(filter-out i686 i586 i486 i386,$(OS_TEST)))
++	OS_REL_CFLAGS	+= -Di386
+ 	CPU_ARCH	= x86
+ endif
+ endif
+@@ -127,17 +104,11 @@
+ endif
+ endif
+ endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+ 
+ 
+ LIBC_TAG		= _glibc
+ 
+-ifeq ($(OS_RELEASE),2.0)
++ifeq ($(KERNEL)-$(OS_RELEASE),linux-2.0)
+ 	OS_REL_CFLAGS	+= -DLINUX2_0
+ 	MKSHLIB		= $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+ 	ifdef MAPFILE
+@@ -155,15 +126,17 @@
+ OS_PTHREAD = -lpthread 
+ endif
+ 
+-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -ansi -Wall -Werror-implicit-function-declaration -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
++OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -ansi -Wall -Werror-implicit-function-declaration -pipe -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
+ OS_LIBS			= $(OS_PTHREAD) -ldl -lc
+ 
++ifeq ($(KERNEL),linux)
++	OS_CFLAGS += -DLINUX -Dlinux
++endif
++
+ ifdef USE_PTHREADS
+ 	DEFINES		+= -D_REENTRANT
+ endif
+ 
+-ARCH			= linux
+-
+ DSO_CFLAGS		= -fPIC
+ DSO_LDOPTS		= -shared $(ARCHFLAG) -Wl,-z,defs
+ DSO_LDFLAGS		=
+Index: security/coreconf/Linux2.6.mk
+===================================================================
+RCS file: /cvsroot/mozilla/security/coreconf/Linux2.6.mk,v
+retrieving revision 1.5
+diff -u -r1.5 Linux2.6.mk
+--- security/coreconf/Linux2.6.mk	16 Sep 2005 17:09:23 -0000	1.5
++++ security/coreconf/Linux2.6.mk	9 Oct 2006 11:23:51 -0000
+@@ -37,7 +37,10 @@
+ 
+ include $(CORE_DEPTH)/coreconf/Linux.mk
+ 
++ifeq ($(KERNEL), linux)
+ OS_REL_CFLAGS   += -DLINUX2_1
++endif
++
+ MKSHLIB         = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+ 
+ ifdef MAPFILE
+Index: security/coreconf/arch.mk
+===================================================================
+RCS file: /cvsroot/mozilla/security/coreconf/arch.mk,v
+retrieving revision 1.19
+diff -u -r1.19 arch.mk
+--- security/coreconf/arch.mk	7 Jul 2005 16:50:47 -0000	1.19
++++ security/coreconf/arch.mk	9 Oct 2006 11:23:52 -0000
+@@ -155,6 +155,14 @@
+     ifneq ($(words $(OS_RELEASE)),1)
+ 	OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE))
+     endif
++    KERNEL = linux
++endif
++
++# This check must be last.  Since all uses of OS_ARCH that follow affect only
++# userland, we can merge other Glibc systems with Linux here.
++ifneq (, $(filter GNU GNU_%, $(OS_ARCH)))
++OS_ARCH = Linux
++OS_RELEASE = 2.6
+ endif
+ 
+ #
+Index: security/coreconf/config.mk
+===================================================================
+RCS file: /cvsroot/mozilla/security/coreconf/config.mk,v
+retrieving revision 1.18
+diff -u -r1.18 config.mk
+--- security/coreconf/config.mk	26 Jun 2006 21:16:54 -0000	1.18
++++ security/coreconf/config.mk	9 Oct 2006 11:23:52 -0000
+@@ -63,7 +63,7 @@
+ #######################################################################
+ 
+ TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
+-              OpenVMS AIX
++              OpenVMS AIX GNU GNU_%
+ 
+ ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
+ include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
+Index: security/nss/lib/freebl/unix_rand.c
+===================================================================
+RCS file: /cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v
+retrieving revision 1.20
+diff -u -r1.20 unix_rand.c
+--- security/nss/lib/freebl/unix_rand.c	6 Sep 2006 21:07:32 -0000	1.20
++++ security/nss/lib/freebl/unix_rand.c	9 Oct 2006 11:23:58 -0000
+@@ -183,7 +183,8 @@
+ #endif
+ 
+ #if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) \
+-    || defined(NETBSD) || defined(NTO) || defined(DARWIN) || defined(OPENBSD)
++    || defined(NETBSD) || defined(NTO) || defined(DARWIN) || defined(OPENBSD) \
++    || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__)
+ #include <sys/times.h>
+ 
+ #define getdtablesize() sysconf(_SC_OPEN_MAX)
+Index: security/nss/lib/ssl/sslmutex.c
+===================================================================
+RCS file: /cvsroot/mozilla/security/nss/lib/ssl/sslmutex.c,v
+retrieving revision 1.20
+diff -u -r1.20 sslmutex.c
+--- security/nss/lib/ssl/sslmutex.c	7 Jun 2006 18:36:26 -0000	1.20
++++ security/nss/lib/ssl/sslmutex.c	9 Oct 2006 11:24:01 -0000
+@@ -89,7 +89,7 @@
+     return SECSuccess;
+ }
+ 
+-#if defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD)
++#if defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD) || defined(__GLIBC__)
+ 
+ #include <unistd.h>
+ #include <fcntl.h>
+Index: security/nss/lib/ssl/sslmutex.h
+===================================================================
+RCS file: /cvsroot/mozilla/security/nss/lib/ssl/sslmutex.h,v
+retrieving revision 1.10
+diff -u -r1.10 sslmutex.h
+--- security/nss/lib/ssl/sslmutex.h	27 Apr 2004 23:04:39 -0000	1.10
++++ security/nss/lib/ssl/sslmutex.h	9 Oct 2006 11:24:01 -0000
+@@ -79,7 +79,7 @@
+ 
+ typedef int    sslPID;
+ 
+-#elif defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD)
++#elif defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD) || defined(__GLIBC__)
+ 
+ #include <sys/types.h>
+ #include "prtypes.h"
+Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
+retrieving revision 1.85
+diff -u -r1.85 Makefile.in
+--- xpcom/reflect/xptcall/src/md/unix/Makefile.in	28 Mar 2006 20:03:49 -0000	1.85
++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	9 Oct 2006 11:24:28 -0000
+@@ -74,7 +74,7 @@
+ # New code for Linux, et. al., with gcc
+ # Migrate other platforms here after testing
+ #
+-ifneq (,$(filter Linux,$(OS_ARCH)))
++ifneq (,$(filter Linux GNU_%,$(OS_ARCH)))
+ # Linux/x86-64
+ ifeq (x86_64,$(OS_TEST))
+ CPPSRCS		:= xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
+Index: xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
+===================================================================
+RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h,v
+retrieving revision 1.20
+diff -u -r1.20 xptc_platforms_unixish_x86.h
+--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h	28 Mar 2006 20:03:50 -0000	1.20
++++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h	9 Oct 2006 11:24:28 -0000
+@@ -67,7 +67,7 @@
+ *
+ */
+ 
+-#if defined(LINUX)
++#if defined(LINUX) || (defined(__GLIBC__) && defined(__FreeBSD_kernel__))
+ 
+ #if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
+ /* Old gcc 2.7.x.x.  What does gcc 2.8.x do?? */

Copied: trunk/web/patches/mozilla/nsprpub.diff (from rev 1670, trunk/web/patches/mozilla/trunk/nsprpub.diff)
===================================================================
--- trunk/web/patches/mozilla/nsprpub.diff	                        (rev 0)
+++ trunk/web/patches/mozilla/nsprpub.diff	2006-10-09 18:37:51 UTC (rev 1671)
@@ -0,0 +1,403 @@
+
+Patch from:
+
+  https://bugzilla.mozilla.org/attachment.cgi?id=206765&action=view
+  (https://bugzilla.mozilla.org/show_bug.cgi?id=261649)
+
+Merged in 20051224.  Passes testsuite (make -C pr/tests).
+
+cvs -d :pserver:anonymous at cvs-mirror.mozilla.org:/cvsroot co mozilla/nsprpub
+
+Please note that for some odd reason this patch breaks BeOS.
+
+Index: nsprpub/configure.in
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/configure.in,v
+retrieving revision 1.83.2.123
+retrieving revision 1.210
+diff -u -r1.83.2.123 -r1.210
+--- nsprpub/configure.in	22 Dec 2005 22:45:32 -0000	1.83.2.123
++++ nsprpub/configure.in	24 Dec 2005 08:25:22 -0000	1.210
+@@ -1336,7 +1336,7 @@
+ 	esac
+     ;;
+ 
+-*-linux*)
++*-linux*|*-gnu*|*-k*bsd*-gnu)
+     if test -z "$USE_NSPR_THREADS"; then
+         USE_PTHREADS=1
+         IMPL_STRATEGY=_PTH
+@@ -1347,7 +1347,11 @@
+     AC_DEFINE(_SVID_SOURCE)
+     AC_DEFINE(_LARGEFILE64_SOURCE)
+     AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+-    AC_DEFINE(LINUX)
++    case "${target_os}" in
++    linux*)
++        AC_DEFINE(LINUX)
++        ;;
++    esac
+     CFLAGS="$CFLAGS -ansi -Wall"
+     CXXFLAGS="$CXXFLAGS -ansi -Wall"
+     MDCPUCFG_H=_linux.cfg
+@@ -2442,7 +2446,7 @@
+             _PTHREAD_LDFLAGS=-pthread
+         fi
+         ;;
+-    *-linux*)
++    *-linux*|*-gnu*|*-k*bsd*-gnu)
+         AC_DEFINE(_REENTRANT)
+         ;;
+     esac
+@@ -2526,7 +2530,7 @@
+         fi
+     fi
+     ;;
+-*-linux*)
++*-linux*|*-gnu*|*-k*bsd*-gnu)
+     if test -n "$USE_NSPR_THREADS"; then
+         AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
+     fi
+Index: nsprpub/config/nsinstall.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/config/nsinstall.c,v
+retrieving revision 3.17.2.3
+retrieving revision 3.21
+diff -u -r3.17.2.3 -r3.21
+--- nsprpub/config/nsinstall.c	28 Apr 2004 00:33:11 -0000	3.17.2.3
++++ nsprpub/config/nsinstall.c	24 Dec 2005 15:03:29 -0000	3.21
+@@ -98,7 +98,7 @@
+ }
+ #endif /* NEXTSTEP */
+ 
+-#ifdef LINUX
++#if defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) 
+ #include <getopt.h>
+ #endif
+ 
+Index: nsprpub/pr/include/md/_linux.cfg
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_linux.cfg,v
+retrieving revision 3.12.4.8
+retrieving revision 3.19
+diff -u -r3.12.4.8 -r3.19
+--- nsprpub/pr/include/md/_linux.cfg	15 Aug 2005 17:53:33 -0000	3.12.4.8
++++ nsprpub/pr/include/md/_linux.cfg	24 Dec 2005 08:25:22 -0000	3.19
+@@ -35,6 +35,11 @@
+  *
+  * ***** END LICENSE BLOCK ***** */
+ 
++/*
++ * This file is used by not only Linux but also other glibc systems
++ * such as GNU/Hurd and GNU/k*BSD.
++ */
++
+ #ifndef nspr_cpucfg___
+ #define nspr_cpucfg___
+ 
+@@ -42,7 +47,7 @@
+ #define XP_UNIX
+ #endif
+ 
+-#ifndef LINUX
++#if !defined(LINUX) && defined(__linux__)
+ #define LINUX
+ #endif
+ 
+Index: nsprpub/pr/include/md/_pth.h
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_pth.h,v
+retrieving revision 3.19.2.13
+retrieving revision 3.32
+diff -u -r3.19.2.13 -r3.32
+--- nsprpub/pr/include/md/_pth.h	15 Aug 2005 17:53:33 -0000	3.19.2.13
++++ nsprpub/pr/include/md/_pth.h	24 Dec 2005 15:03:30 -0000	3.32
+@@ -143,10 +143,15 @@
+ 	(!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t)))
+ #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
+ #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
+-	|| defined(HPUX) || defined(LINUX) || defined(FREEBSD) \
++	|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
++	|| defined(HPUX) || defined(FREEBSD) \
+ 	|| defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
+ 	|| defined(VMS) || defined(NTO) || defined(DARWIN) \
+ 	|| defined(UNIXWARE) || defined(RISCOS)
++#ifdef __GNU__
++/* Hurd pthreads don't have an invalid value for pthread_t. -- rmh */
++#error Using Hurd pthreads
++#endif
+ #define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t)  (t) = 0
+ #define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t)  (t) == 0
+ #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
+@@ -195,7 +200,8 @@
+ /*
+  * These platforms don't have sigtimedwait()
+  */
+-#if (defined(AIX) && !defined(AIX4_3_PLUS)) || defined(LINUX) \
++#if (defined(AIX) && !defined(AIX4_3_PLUS)) \
++	|| defined(LINUX) || defined(__GNU__)|| defined(__GLIBC__) \
+ 	|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
+ 	|| defined(BSDI) || defined(VMS) || defined(UNIXWARE) \
+ 	|| defined(DARWIN)
+@@ -235,7 +241,8 @@
+ #define PT_PRIO_MAX            sched_get_priority_max(SCHED_OTHER)
+ #endif /* defined(_PR_DCETHREADS) */
+ 
+-#elif defined(LINUX) || defined(FREEBSD)
++#elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
++	|| defined(FREEBSD)
+ #define PT_PRIO_MIN            sched_get_priority_min(SCHED_OTHER)
+ #define PT_PRIO_MAX            sched_get_priority_max(SCHED_OTHER)
+ #elif defined(NTO)
+@@ -291,7 +298,8 @@
+ 		onemillisec.tv_nsec = 1000000L;			\
+         nanosleep(&onemillisec,NULL);			\
+     PR_END_MACRO
+-#elif defined(HPUX) || defined(LINUX) || defined(SOLARIS) \
++#elif defined(HPUX) || defined(SOLARIS) \
++	|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
+ 	|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
+ 	|| defined(BSDI) || defined(NTO) || defined(DARWIN) \
+ 	|| defined(UNIXWARE) || defined(RISCOS)
+Index: nsprpub/pr/include/md/_unixos.h
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_unixos.h,v
+retrieving revision 3.31.4.4
+retrieving revision 3.36
+diff -u -r3.31.4.4 -r3.36
+--- nsprpub/pr/include/md/_unixos.h	17 Jan 2005 22:13:36 -0000	3.31.4.4
++++ nsprpub/pr/include/md/_unixos.h	24 Dec 2005 08:25:23 -0000	3.36
+@@ -46,7 +46,8 @@
+  * Linux: FD_SETSIZE is defined in /usr/include/sys/select.h and should
+  * not be redefined.
+  */
+-#if !defined(LINUX) && !defined(DARWIN) && !defined(NEXTSTEP)
++#if !defined(LINUX) && !defined(__GNU__) && !defined(__GLIBC__) \
++    && !defined(DARWIN) && !defined(NEXTSTEP)
+ #ifndef FD_SETSIZE
+ #define FD_SETSIZE  4096
+ #endif
+Index: nsprpub/pr/include/md/prosdep.h
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/prosdep.h,v
+retrieving revision 3.13.4.3
+retrieving revision 3.17
+diff -u -r3.13.4.3 -r3.17
+--- nsprpub/pr/include/md/prosdep.h	15 Aug 2005 17:53:33 -0000	3.13.4.3
++++ nsprpub/pr/include/md/prosdep.h	24 Dec 2005 08:25:23 -0000	3.17
+@@ -90,7 +90,7 @@
+ #elif defined(IRIX)
+ #include "md/_irix.h"
+ 
+-#elif defined(LINUX)
++#elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
+ #include "md/_linux.h"
+ 
+ #elif defined(OSF1)
+Index: nsprpub/pr/src/linking/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/linking/Makefile.in,v
+retrieving revision 1.10.2.5
+retrieving revision 1.17
+diff -u -r1.10.2.5 -r1.17
+--- nsprpub/pr/src/linking/Makefile.in	26 Oct 2005 19:05:10 -0000	1.10.2.5
++++ nsprpub/pr/src/linking/Makefile.in	24 Dec 2005 15:03:30 -0000	1.17
+@@ -63,7 +63,7 @@
+ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
+ 
+ # For Dl_info and dladdr.
+-ifeq ($(OS_TARGET),Linux)
++ifeq (,$(filter-out Linux GNU GNU_%,$(OS_TARGET)))
+ DEFINES    += -D_GNU_SOURCE
+ endif
+ 
+Index: nsprpub/pr/src/linking/prlink.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/linking/prlink.c,v
+retrieving revision 3.51.2.28
+retrieving revision 3.84
+diff -u -r3.51.2.28 -r3.84
+--- nsprpub/pr/src/linking/prlink.c	7 Nov 2005 22:07:32 -0000	3.51.2.28
++++ nsprpub/pr/src/linking/prlink.c	24 Dec 2005 15:03:30 -0000	3.84
+@@ -1388,7 +1388,8 @@
+ PR_IMPLEMENT(char *)
+ PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr)
+ {
+-#if defined(SOLARIS) || defined(LINUX) || defined(FREEBSD)
++#if defined(SOLARIS) || defined(FREEBSD) \
++        || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
+     Dl_info dli;
+     char *result;
+ 
+Index: nsprpub/pr/src/md/prosdep.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/prosdep.c,v
+retrieving revision 3.9.4.2
+retrieving revision 3.12
+diff -u -r3.9.4.2 -r3.12
+--- nsprpub/pr/src/md/prosdep.c	28 Apr 2004 00:33:56 -0000	3.9.4.2
++++ nsprpub/pr/src/md/prosdep.c	24 Dec 2005 08:25:29 -0000	3.12
+@@ -63,7 +63,8 @@
+ 
+     /* Get page size */
+ #ifdef XP_UNIX
+-#if defined SUNOS4 || defined LINUX || defined BSDI || defined AIX \
++#if defined SUNOS4 || defined BSDI || defined AIX \
++        || defined LINUX || defined __GNU__ || defined __GLIBC__ \
+         || defined FREEBSD || defined NETBSD || defined OPENBSD \
+         || defined DARWIN || defined NEXTSTEP
+     _pr_pageSize = getpagesize();
+Index: nsprpub/pr/src/md/unix/unix.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/unix/unix.c,v
+retrieving revision 3.43.2.8
+retrieving revision 3.52
+diff -u -r3.43.2.8 -r3.52
+--- nsprpub/pr/src/md/unix/unix.c	15 Aug 2005 17:53:43 -0000	3.43.2.8
++++ nsprpub/pr/src/md/unix/unix.c	24 Dec 2005 08:25:29 -0000	3.52
+@@ -65,7 +65,7 @@
+  * PRInt32* pointer to a _PRSockLen_t* pointer.
+  */
+ #if defined(HAVE_SOCKLEN_T) \
+-    || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
++    || (defined(__GLIBC__) && __GLIBC__ >= 2)
+ #define _PRSockLen_t socklen_t
+ #elif defined(IRIX) || defined(HPUX) || defined(OSF1) || defined(SOLARIS) \
+     || defined(AIX4_1) || defined(LINUX) || defined(SONY) \
+Index: nsprpub/pr/src/md/unix/uxproces.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/unix/uxproces.c,v
+retrieving revision 3.14.2.5
+retrieving revision 3.20
+diff -u -r3.14.2.5 -r3.20
+--- nsprpub/pr/src/md/unix/uxproces.c	15 Dec 2004 05:52:40 -0000	3.14.2.5
++++ nsprpub/pr/src/md/unix/uxproces.c	24 Dec 2005 08:25:29 -0000	3.20
+@@ -92,7 +92,8 @@
+  * that can share the virtual address space and file descriptors.
+  */
+ #if (defined(IRIX) && !defined(_PR_PTHREADS)) \
+-        || (defined(LINUX) && defined(_PR_PTHREADS))
++        || ((defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)) \
++        && defined(_PR_PTHREADS))
+ #define _PR_SHARE_CLONES
+ #endif
+ 
+@@ -106,7 +107,8 @@
+  */
+ 
+ #if defined(_PR_GLOBAL_THREADS_ONLY) \
+-	|| (defined(_PR_PTHREADS) && !defined(LINUX))
++	|| (defined(_PR_PTHREADS) \
++	&& !defined(LINUX) && !defined(__GNU__) && !defined(__GLIBC__))
+ #define _PR_NATIVE_THREADS
+ #endif
+ 
+Index: nsprpub/pr/src/md/unix/uxrng.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/unix/uxrng.c,v
+retrieving revision 1.11.4.5
+retrieving revision 1.19
+diff -u -r1.11.4.5 -r1.19
+--- nsprpub/pr/src/md/unix/uxrng.c	15 Aug 2005 17:53:43 -0000	1.11.4.5
++++ nsprpub/pr/src/md/unix/uxrng.c	24 Dec 2005 08:25:29 -0000	1.19
+@@ -138,7 +138,8 @@
+     return 0;
+ }
+ 
+-#elif (defined(LINUX) || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD))
++#elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \
++    || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD))
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+Index: nsprpub/pr/src/misc/prnetdb.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c,v
+retrieving revision 3.21.2.26
+retrieving revision 3.48
+diff -u -r3.21.2.26 -r3.48
+--- nsprpub/pr/src/misc/prnetdb.c	15 Aug 2005 17:53:52 -0000	3.21.2.26
++++ nsprpub/pr/src/misc/prnetdb.c	24 Dec 2005 08:25:30 -0000	3.48
+@@ -108,7 +108,7 @@
+ #define _PR_HAVE_GETPROTO_R_INT
+ #endif
+ 
+-#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
++#if (defined(__GLIBC__) && __GLIBC__ >= 2)
+ #define _PR_HAVE_GETPROTO_R
+ #define _PR_HAVE_5_ARG_GETPROTO_R
+ #endif
+Index: nsprpub/pr/src/pthreads/ptio.c
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/src/pthreads/ptio.c,v
+retrieving revision 3.71.2.23
+retrieving revision 3.103
+diff -u -r3.71.2.23 -r3.103
+--- nsprpub/pr/src/pthreads/ptio.c	7 Nov 2005 22:23:25 -0000	3.71.2.23
++++ nsprpub/pr/src/pthreads/ptio.c	24 Dec 2005 08:25:30 -0000	3.103
+@@ -205,7 +205,8 @@
+ #define _PRSelectFdSetArg_t void *
+ #elif defined(IRIX) || (defined(AIX) && !defined(AIX4_1)) \
+     || defined(OSF1) || defined(SOLARIS) \
+-    || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \
++    || defined(HPUX10_30) || defined(HPUX11) \
++    || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
+     || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
+     || defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) \
+     || defined(UNIXWARE) || defined(RISCOS)
+@@ -289,7 +290,7 @@
+  * most current systems.
+  */
+ #if defined(HAVE_SOCKLEN_T) \
+-    || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
++    || (defined(__GLIBC__) && __GLIBC__ >= 2)
+ typedef socklen_t pt_SockLen;
+ #elif (defined(AIX) && !defined(AIX4_1)) \
+     || defined(VMS)
+@@ -3230,7 +3231,8 @@
+ };
+ 
+ #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \
+-    || defined(AIX) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD) \
++    || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
++    || defined(AIX) || defined(FREEBSD) || defined(NETBSD) \
+     || defined(OPENBSD) || defined(BSDI) || defined(VMS) || defined(NTO) \
+     || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS)
+ #define _PR_FCNTL_FLAGS O_NONBLOCK
+@@ -4727,7 +4729,8 @@
+ 
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#if !defined(SUNOS4) && !defined(HPUX) && !defined(LINUX)
++#if !defined(SUNOS4) && !defined(HPUX) \
++    && !defined(LINUX) && !defined(__GNU__) && !defined(__GLIBC__)
+ #include <sys/select.h>
+ #endif
+ 
+Index: nsprpub/pr/tests/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/nsprpub/pr/tests/Makefile.in,v
+retrieving revision 1.34.2.13
+retrieving revision 1.49
+diff -u -r1.34.2.13 -r1.49
+--- nsprpub/pr/tests/Makefile.in	28 Apr 2004 00:34:16 -0000	1.34.2.13
++++ nsprpub/pr/tests/Makefile.in	24 Dec 2005 15:03:31 -0000	1.49
+@@ -376,14 +376,10 @@
+     EXTRA_LIBS = -lsocket -lnsl -lgen -lresolv
+ endif
+ 
+-ifeq ($(OS_ARCH), Linux)
+-    ifeq ($(OS_RELEASE), 1.2)
+-        EXTRA_LIBS = -ldl
+-    else
+-        LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
+-        ifeq ($(USE_PTHREADS),1)
+-            EXTRA_LIBS = -lpthread
+-        endif
++ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
++    LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
++    ifeq ($(USE_PTHREADS),1)
++        EXTRA_LIBS = -lpthread
+     endif
+ endif
+ 

Added: trunk/web/patches/mozilla/nsprpub2.diff
===================================================================
--- trunk/web/patches/mozilla/nsprpub2.diff	                        (rev 0)
+++ trunk/web/patches/mozilla/nsprpub2.diff	2006-10-09 18:37:51 UTC (rev 1671)
@@ -0,0 +1,40 @@
+
+In https://bugzilla.mozilla.org/show_bug.cgi?id=355999
+
+
+only in patch2:
+unchanged:
+--- nsprpub/pr/include/md/_linux.cfg
++++ nsprpub/pr/include/md/_linux.cfg
+@@ -51,7 +51,11 @@
+ #define LINUX
+ #endif
+ 
++#ifdef __FreeBSD_kernel__
++#define PR_AF_INET6 28  /* same as AF_INET6 */
++#else
+ #define PR_AF_INET6 10  /* same as AF_INET6 */
++#endif
+ 
+ #ifdef __powerpc64__
+ 
+only in patch2:
+unchanged:
+--- nsprpub/pr/include/md/_linux.h
++++ nsprpub/pr/include/md/_linux.h
+@@ -41,6 +41,15 @@
+ #include "prthread.h"
+ 
+ /*
++ * This file is used by not only Linux but also other glibc systems
++ * such as GNU/Hurd and GNU/k*BSD.
++ */
++
++#ifdef __FreeBSD_kernel__
++#define _PR_HAVE_SOCKADDR_LEN 
++#endif
++   
++/*
+  * Internal configuration macros
+  */
+ 




More information about the Glibc-bsd-commits mailing list