1 diff -durN nspr-4.4.1.orig/mozilla/nsprpub/configure nspr-4.4.1/mozilla/nsprpub/configure
2 --- nspr-4.4.1.orig/mozilla/nsprpub/configure 2003-11-25 01:09:04.000000000 +0100
3 +++ nspr-4.4.1/mozilla/nsprpub/configure 2005-01-01 00:41:55.973908344 +0100
6 PR_MD_ASFILES=os_Linux_ia64.s
9 + PR_MD_ASFILES=os_Linux_x86_64.s
12 CFLAGS="$CFLAGS -m68020-60"
13 CXXFLAGS="$CXXFLAGS -m68020-60"
14 diff -durN nspr-4.4.1.orig/mozilla/nsprpub/configure.in nspr-4.4.1/mozilla/nsprpub/configure.in
15 --- nspr-4.4.1.orig/mozilla/nsprpub/configure.in 2005-01-01 00:36:47.000000000 +0100
16 +++ nspr-4.4.1/mozilla/nsprpub/configure.in 2005-01-01 00:41:55.971908648 +0100
19 PR_MD_ASFILES=os_Linux_ia64.s
22 + PR_MD_ASFILES=os_Linux_x86_64.s
25 CFLAGS="$CFLAGS -m68020-60"
26 CXXFLAGS="$CXXFLAGS -m68020-60"
27 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
28 --- nspr-4.4.1.orig/mozilla/nsprpub/pr/include/md/_linux.cfg 2003-01-23 18:03:19.000000000 +0100
29 +++ nspr-4.4.1/mozilla/nsprpub/pr/include/md/_linux.cfg 2005-01-01 00:41:55.968909104 +0100
31 #define PR_BYTES_PER_WORD_LOG2 3
32 #define PR_BYTES_PER_DWORD_LOG2 3
34 +#elif defined(__x86_64__)
36 +#define IS_LITTLE_ENDIAN 1
40 +#define PR_BYTES_PER_BYTE 1
41 +#define PR_BYTES_PER_SHORT 2
42 +#define PR_BYTES_PER_INT 4
43 +#define PR_BYTES_PER_INT64 8
44 +#define PR_BYTES_PER_LONG 8
45 +#define PR_BYTES_PER_FLOAT 4
46 +#define PR_BYTES_PER_DOUBLE 8
47 +#define PR_BYTES_PER_WORD 8
48 +#define PR_BYTES_PER_DWORD 8
50 +#define PR_BITS_PER_BYTE 8
51 +#define PR_BITS_PER_SHORT 16
52 +#define PR_BITS_PER_INT 32
53 +#define PR_BITS_PER_INT64 64
54 +#define PR_BITS_PER_LONG 64
55 +#define PR_BITS_PER_FLOAT 32
56 +#define PR_BITS_PER_DOUBLE 64
57 +#define PR_BITS_PER_WORD 64
59 +#define PR_BITS_PER_BYTE_LOG2 3
60 +#define PR_BITS_PER_SHORT_LOG2 4
61 +#define PR_BITS_PER_INT_LOG2 5
62 +#define PR_BITS_PER_INT64_LOG2 6
63 +#define PR_BITS_PER_LONG_LOG2 6
64 +#define PR_BITS_PER_FLOAT_LOG2 5
65 +#define PR_BITS_PER_DOUBLE_LOG2 6
66 +#define PR_BITS_PER_WORD_LOG2 6
68 +#define PR_ALIGN_OF_SHORT 2
69 +#define PR_ALIGN_OF_INT 4
70 +#define PR_ALIGN_OF_LONG 8
71 +#define PR_ALIGN_OF_INT64 8
72 +#define PR_ALIGN_OF_FLOAT 4
73 +#define PR_ALIGN_OF_DOUBLE 8
74 +#define PR_ALIGN_OF_POINTER 8
75 +#define PR_ALIGN_OF_WORD 8
77 +#define PR_BYTES_PER_WORD_LOG2 3
78 +#define PR_BYTES_PER_DWORD_LOG2 3
80 #elif defined(__mc68000__)
82 #undef IS_LITTLE_ENDIAN
83 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
84 --- nspr-4.4.1.orig/mozilla/nsprpub/pr/include/md/_linux.h 2003-01-23 18:03:19.000000000 +0100
85 +++ nspr-4.4.1/mozilla/nsprpub/pr/include/md/_linux.h 2005-01-01 00:41:55.968909104 +0100
87 #define _PR_SI_ARCHITECTURE "alpha"
88 #elif defined(__ia64__)
89 #define _PR_SI_ARCHITECTURE "ia64"
90 +#elif defined(__x86_64__)
91 +#define _PR_SI_ARCHITECTURE "x86-64"
92 #elif defined(__mc68000__)
93 #define _PR_SI_ARCHITECTURE "m68k"
94 #elif defined(__sparc__)
96 #define _MD_ATOMIC_SET _PR_ia64_AtomicSet
99 +#if defined(__x86_64__)
100 +#define _PR_HAVE_ATOMIC_OPS
101 +#define _MD_INIT_ATOMIC()
102 +extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val);
103 +#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement
104 +extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val);
105 +#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement
106 +extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
107 +#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd
108 +extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
109 +#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
113 #if defined(__GLIBC__) && __GLIBC__ >= 2
114 #define _PR_POLL_AVAILABLE
115 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
116 --- nspr-4.4.1.orig/mozilla/nsprpub/pr/src/io/prprf.c 2003-01-23 18:03:22.000000000 +0100
117 +++ nspr-4.4.1/mozilla/nsprpub/pr/src/io/prprf.c 2005-01-01 00:41:55.969908952 +0100
119 ** Note: on some platforms va_list is defined as an array,
120 ** and requires array notation.
122 -#if (defined(LINUX) && defined(__powerpc__)) || \
123 +#if (defined(LINUX) && defined(__x86_64__))
125 +#define VARARGS_ASSIGN(foo, bar) __va_copy((foo), (bar))
126 +#elif (defined(LINUX) && defined(__powerpc__)) || \
127 (defined(LINUX) && defined(__s390__)) || \
128 (defined(LINUX) && defined(__s390x__)) || \
129 defined(WIN16) || defined(QNX) || \
130 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
131 --- nspr-4.4.1.orig/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s 1970-01-01 01:00:00.000000000 +0100
132 +++ nspr-4.4.1/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s 2005-01-01 00:41:55.969908952 +0100
134 +/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
136 +/ The contents of this file are subject to the Mozilla Public
137 +/ License Version 1.1 (the "License"); you may not use this file
138 +/ except in compliance with the License. You may obtain a copy of
139 +/ the License at http://www.mozilla.org/MPL/
141 +/ Software distributed under the License is distributed on an "AS
142 +/ IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
143 +/ implied. See the License for the specific language governing
144 +/ rights and limitations under the License.
146 +/ The Original Code is the Netscape Portable Runtime (NSPR).
148 +/ The Initial Developer of the Original Code is Netscape
149 +/ Communications Corporation. Portions created by Netscape are
150 +/ Copyright (C) 2000 Netscape Communications Corporation. All
155 +/ Alternatively, the contents of this file may be used under the
156 +/ terms of the GNU General Public License Version 2 or later (the
157 +/ "GPL"), in which case the provisions of the GPL are applicable
158 +/ instead of those above. If you wish to allow use of your
159 +/ version of this file only under the terms of the GPL and not to
160 +/ allow others to use your version of this file under the MPL,
161 +/ indicate your decision by deleting the provisions above and
162 +/ replace them with the notice and other provisions required by
163 +/ the GPL. If you do not delete the provisions above, a recipient
164 +/ may use your version of this file under either the MPL or the
168 +/ PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val)
170 +/ Atomically increment the integer pointed to by 'val' and return
171 +/ the result of the increment.
174 + .globl _PR_x86_64_AtomicIncrement
176 +_PR_x86_64_AtomicIncrement:
183 +/ PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val)
185 +/ Atomically decrement the integer pointed to by 'val' and return
186 +/ the result of the decrement.
189 + .globl _PR_x86_64_AtomicDecrement
191 +_PR_x86_64_AtomicDecrement:
198 +/ PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval)
200 +/ Atomically set the integer pointed to by 'val' to the new
201 +/ value 'newval' and return the old value.
203 + .globl _PR_x86_64_AtomicSet
205 +_PR_x86_64_AtomicSet:
211 +/ PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val)
213 +/ Atomically add 'val' to the integer pointed to by 'ptr'
214 +/ and return the result of the addition.
217 + .globl _PR_x86_64_AtomicAdd
219 +_PR_x86_64_AtomicAdd: