From 8ee52477a83ec33c6b07c549cc2d9e1ebcc69db8 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Thu, 13 Nov 2008 22:35:51 +0000 Subject: [PATCH] This commit was manufactured by cvs2git to create branch 'DEVEL'. Sprout from master 2008-11-13 22:35:51 UTC Jakub Bogusz '- updated to 4.7.3' Cherrypick from master 2004-01-01 00:00:59 UTC Jacek Konieczny '- fix for nspr-config to return right libdir': nspr-am18.patch -> 1.1 nspr-amd64.patch -> 1.1 nspr-libdir.patch -> 1.1 --- nspr-am18.patch | 11 +++ nspr-amd64.patch | 224 ++++++++++++++++++++++++++++++++++++++++++++++ nspr-libdir.patch | 20 +++++ 3 files changed, 255 insertions(+) create mode 100644 nspr-am18.patch create mode 100644 nspr-amd64.patch create mode 100644 nspr-libdir.patch diff --git a/nspr-am18.patch b/nspr-am18.patch new file mode 100644 index 0000000..c2d6ff8 --- /dev/null +++ b/nspr-am18.patch @@ -0,0 +1,11 @@ +--- nspr-4.4.1/mozilla/nsprpub/config/nspr.m4.orig 2001-05-12 02:36:57.000000000 +0200 ++++ nspr-4.4.1/mozilla/nsprpub/config/nspr.m4 2003-12-29 02:43:51.525951528 +0100 +@@ -5,7 +5,7 @@ + + dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS +-AC_DEFUN(AM_PATH_NSPR, ++AC_DEFUN([AM_PATH_NSPR], + [dnl + + AC_ARG_WITH(nspr-prefix, diff --git a/nspr-amd64.patch b/nspr-amd64.patch new file mode 100644 index 0000000..cf2680b --- /dev/null +++ b/nspr-amd64.patch @@ -0,0 +1,224 @@ +diff -durN nspr-4.4.1.orig/mozilla/nsprpub/configure nspr-4.4.1/mozilla/nsprpub/configure +--- nspr-4.4.1.orig/mozilla/nsprpub/configure 2003-11-25 01:09:04.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/configure 2005-01-01 00:41:55.973908344 +0100 +@@ -3729,6 +3729,9 @@ + ia64) + PR_MD_ASFILES=os_Linux_ia64.s + ;; ++ x86_64) ++ PR_MD_ASFILES=os_Linux_x86_64.s ++ ;; + m68k) + CFLAGS="$CFLAGS -m68020-60" + CXXFLAGS="$CXXFLAGS -m68020-60" +diff -durN nspr-4.4.1.orig/mozilla/nsprpub/configure.in nspr-4.4.1/mozilla/nsprpub/configure.in +--- nspr-4.4.1.orig/mozilla/nsprpub/configure.in 2005-01-01 00:36:47.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/configure.in 2005-01-01 00:41:55.971908648 +0100 +@@ -1218,6 +1218,9 @@ + ia64) + PR_MD_ASFILES=os_Linux_ia64.s + ;; ++ x86_64) ++ PR_MD_ASFILES=os_Linux_x86_64.s ++ ;; + m68k) + CFLAGS="$CFLAGS -m68020-60" + CXXFLAGS="$CXXFLAGS -m68020-60" +diff -durN nspr-4.4.1.orig/mozilla/nsprpub/pr/include/md/_linux.cfg nspr-4.4.1/mozilla/nsprpub/pr/include/md/_linux.cfg +--- nspr-4.4.1.orig/mozilla/nsprpub/pr/include/md/_linux.cfg 2003-01-23 18:03:19.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/pr/include/md/_linux.cfg 2005-01-01 00:41:55.968909104 +0100 +@@ -182,6 +182,52 @@ + #define PR_BYTES_PER_WORD_LOG2 3 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(__x86_64__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#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(__mc68000__) + + #undef IS_LITTLE_ENDIAN +diff -durN nspr-4.4.1.orig/mozilla/nsprpub/pr/include/md/_linux.h nspr-4.4.1/mozilla/nsprpub/pr/include/md/_linux.h +--- nspr-4.4.1.orig/mozilla/nsprpub/pr/include/md/_linux.h 2003-01-23 18:03:19.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/pr/include/md/_linux.h 2005-01-01 00:41:55.968909104 +0100 +@@ -49,6 +49,8 @@ + #define _PR_SI_ARCHITECTURE "alpha" + #elif defined(__ia64__) + #define _PR_SI_ARCHITECTURE "ia64" ++#elif defined(__x86_64__) ++#define _PR_SI_ARCHITECTURE "x86-64" + #elif defined(__mc68000__) + #define _PR_SI_ARCHITECTURE "m68k" + #elif defined(__sparc__) +@@ -107,6 +109,19 @@ + #define _MD_ATOMIC_SET _PR_ia64_AtomicSet + #endif + ++#if defined(__x86_64__) ++#define _PR_HAVE_ATOMIC_OPS ++#define _MD_INIT_ATOMIC() ++extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val); ++#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement ++extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val); ++#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement ++extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val); ++#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd ++extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); ++#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet ++#endif ++ + #define USE_SETJMP + #if defined(__GLIBC__) && __GLIBC__ >= 2 + #define _PR_POLL_AVAILABLE +diff -durN nspr-4.4.1.orig/mozilla/nsprpub/pr/src/io/prprf.c nspr-4.4.1/mozilla/nsprpub/pr/src/io/prprf.c +--- nspr-4.4.1.orig/mozilla/nsprpub/pr/src/io/prprf.c 2003-01-23 18:03:22.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/pr/src/io/prprf.c 2005-01-01 00:41:55.969908952 +0100 +@@ -51,7 +51,10 @@ + ** Note: on some platforms va_list is defined as an array, + ** and requires array notation. + */ +-#if (defined(LINUX) && defined(__powerpc__)) || \ ++#if (defined(LINUX) && defined(__x86_64__)) ++#include ++#define VARARGS_ASSIGN(foo, bar) __va_copy((foo), (bar)) ++#elif (defined(LINUX) && defined(__powerpc__)) || \ + (defined(LINUX) && defined(__s390__)) || \ + (defined(LINUX) && defined(__s390x__)) || \ + defined(WIN16) || defined(QNX) || \ +diff -durN nspr-4.4.1.orig/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s nspr-4.4.1/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s +--- nspr-4.4.1.orig/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s 1970-01-01 01:00:00.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s 2005-01-01 00:41:55.969908952 +0100 +@@ -0,0 +1,91 @@ ++/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- ++/ ++/ The contents of this file are subject to the Mozilla Public ++/ License Version 1.1 (the "License"); you may not use this file ++/ except in compliance with the License. You may obtain a copy of ++/ the License at http://www.mozilla.org/MPL/ ++/ ++/ Software distributed under the License is distributed on an "AS ++/ IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++/ implied. See the License for the specific language governing ++/ rights and limitations under the License. ++/ ++/ The Original Code is the Netscape Portable Runtime (NSPR). ++/ ++/ The Initial Developer of the Original Code is Netscape ++/ Communications Corporation. Portions created by Netscape are ++/ Copyright (C) 2000 Netscape Communications Corporation. All ++/ Rights Reserved. ++/ ++/ Contributor(s): ++/ ++/ Alternatively, the contents of this file may be used under the ++/ terms of the GNU General Public License Version 2 or later (the ++/ "GPL"), in which case the provisions of the GPL are applicable ++/ instead of those above. If you wish to allow use of your ++/ version of this file only under the terms of the GPL and not to ++/ allow others to use your version of this file under the MPL, ++/ indicate your decision by deleting the provisions above and ++/ replace them with the notice and other provisions required by ++/ the GPL. If you do not delete the provisions above, a recipient ++/ may use your version of this file under either the MPL or the ++/ GPL. ++/ ++ ++/ PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val) ++/ ++/ Atomically increment the integer pointed to by 'val' and return ++/ the result of the increment. ++/ ++ .text ++ .globl _PR_x86_64_AtomicIncrement ++ .align 4 ++_PR_x86_64_AtomicIncrement: ++ movl $1, %eax ++ lock ++ xaddl %eax, (%rdi) ++ incl %eax ++ ret ++ ++/ PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val) ++/ ++/ Atomically decrement the integer pointed to by 'val' and return ++/ the result of the decrement. ++/ ++ .text ++ .globl _PR_x86_64_AtomicDecrement ++ .align 4 ++_PR_x86_64_AtomicDecrement: ++ movl $-1, %eax ++ lock ++ xaddl %eax, (%rdi) ++ decl %eax ++ ret ++ ++/ PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval) ++/ ++/ Atomically set the integer pointed to by 'val' to the new ++/ value 'newval' and return the old value. ++ .text ++ .globl _PR_x86_64_AtomicSet ++ .align 4 ++_PR_x86_64_AtomicSet: ++ movl %esi, %eax ++ lock ++ xchgl %eax, (%rdi) ++ ret ++ ++/ PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val) ++/ ++/ Atomically add 'val' to the integer pointed to by 'ptr' ++/ and return the result of the addition. ++/ ++ .text ++ .globl _PR_x86_64_AtomicAdd ++ .align 4 ++_PR_x86_64_AtomicAdd: ++ movl %esi, %eax ++ lock ++ xaddl %eax, (%rdi) ++ addl %esi, %eax ++ ret diff --git a/nspr-libdir.patch b/nspr-libdir.patch new file mode 100644 index 0000000..cf3c7f6 --- /dev/null +++ b/nspr-libdir.patch @@ -0,0 +1,20 @@ +diff -durN -x '*~' nspr-4.4.1.orig/mozilla/nsprpub/config/nspr-config.in nspr-4.4.1/mozilla/nsprpub/config/nspr-config.in +--- nspr-4.4.1.orig/mozilla/nsprpub/config/nspr-config.in 2003-02-28 02:48:15.000000000 +0100 ++++ nspr-4.4.1/mozilla/nsprpub/config/nspr-config.in 2005-01-01 00:50:43.057779416 +0100 +@@ -2,6 +2,7 @@ + + prefix=@prefix@ + exec_prefix=@exec_prefix@ ++libdir=@libdir@ + exec_prefix_set=no + + major_version=@MOD_MAJOR_VERSION@ +@@ -95,7 +96,7 @@ + fi + + if test "$echo_libs" = "yes"; then +- libdirs=-L${exec_prefix}/lib ++ libdirs=-L${libdir} + if test -n "$lib_plds"; then + libdirs="$libdirs -lplds${major_version}" + fi -- 2.44.0