~mozillateam/nss/nss.intrepid

« back to all changes in this revision

Viewing changes to debian/patches/38_kbsd.patch

  • Committer: Alexander Sack
  • Date: 2009-07-25 12:58:32 UTC
  • Revision ID: asac@ubuntu.com-20090725125832-y6x2d5c6qy8gfpj5
* drop (ubuntu-)useless kbsd patch
  - delete debian/patches/38_kbsd.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
---
2
 
 mozilla/security/coreconf/Linux.mk          |   66 ++++++----------------------
3
 
 mozilla/security/coreconf/Linux2.6.mk       |    3 +
4
 
 mozilla/security/coreconf/arch.mk           |    8 +++
5
 
 mozilla/security/coreconf/config.mk         |    2 
6
 
 mozilla/security/nss/lib/freebl/unix_rand.c |    4 +
7
 
 mozilla/security/nss/lib/ssl/sslmutex.c     |    2 
8
 
 mozilla/security/nss/lib/ssl/sslmutex.h     |    2 
9
 
 7 files changed, 33 insertions(+), 54 deletions(-)
10
 
 
11
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/nss/lib/freebl/unix_rand.c
12
 
===================================================================
13
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/nss/lib/freebl/unix_rand.c   2007-08-17 16:51:22.000000000 +0000
14
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/nss/lib/freebl/unix_rand.c        2007-08-17 16:51:26.000000000 +0000
15
 
@@ -180,17 +180,19 @@
16
 
         rv = SECFailure;
17
 
     }
18
 
     return rv;
19
 
 }
20
 
 
21
 
 #endif
22
 
 
23
 
 #if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) \
24
 
-    || defined(NETBSD) || defined(NTO) || defined(DARWIN) || defined(OPENBSD)
25
 
+    || defined(NETBSD) || defined(NTO) || defined(DARWIN) || defined(OPENBSD) \
26
 
+    || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__) \
27
 
+    || defined(__GNU__)
28
 
 #include <sys/times.h>
29
 
 
30
 
 #define getdtablesize() sysconf(_SC_OPEN_MAX)
31
 
 
32
 
 static size_t
33
 
 GetHighResClock(void *buf, size_t maxbytes)
34
 
 {
35
 
     int ticks;
36
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/nss/lib/ssl/sslmutex.c
37
 
===================================================================
38
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/nss/lib/ssl/sslmutex.c       2006-06-07 18:36:26.000000000 +0000
39
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/nss/lib/ssl/sslmutex.c    2007-08-17 16:51:26.000000000 +0000
40
 
@@ -84,17 +84,17 @@
41
 
     if (!pMutex->u.sslLock) {
42
 
         PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
43
 
         return SECFailure;
44
 
     }
45
 
     PR_Lock(pMutex->u.sslLock);
46
 
     return SECSuccess;
47
 
 }
48
 
 
49
 
-#if defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD)
50
 
+#if defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD) || defined(__GLIBC__)
51
 
 
52
 
 #include <unistd.h>
53
 
 #include <fcntl.h>
54
 
 #include <string.h>
55
 
 #include <errno.h>
56
 
 #include "unix_err.h"
57
 
 #include "pratom.h"
58
 
 
59
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/nss/lib/ssl/sslmutex.h
60
 
===================================================================
61
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/nss/lib/ssl/sslmutex.h       2004-04-27 23:04:39.000000000 +0000
62
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/nss/lib/ssl/sslmutex.h    2007-08-17 16:51:26.000000000 +0000
63
 
@@ -74,17 +74,17 @@
64
 
 #endif
65
 
         PRLock* sslLock;
66
 
         HANDLE sslMutx;
67
 
     } u;
68
 
 } sslMutex;
69
 
 
70
 
 typedef int    sslPID;
71
 
 
72
 
-#elif defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD)
73
 
+#elif defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) || defined(BSDI) || defined(NETBSD) || defined(OPENBSD) || defined(__GLIBC__)
74
 
 
75
 
 #include <sys/types.h>
76
 
 #include "prtypes.h"
77
 
 
78
 
 typedef struct { 
79
 
     PRBool isMultiProcess;
80
 
     union {
81
 
         PRLock* sslLock;
82
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/Linux.mk
83
 
===================================================================
84
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/coreconf/Linux.mk    2007-08-17 16:57:01.000000000 +0000
85
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/Linux.mk 2007-08-17 18:23:44.000000000 +0000
86
 
@@ -47,102 +47,70 @@
87
 
 endif
88
 
 
89
 
 CC                     = gcc
90
 
 CCC                    = g++
91
 
 RANLIB                 = ranlib
92
 
 
93
 
 DEFAULT_COMPILER = gcc
94
 
 
95
 
-ifeq ($(OS_TEST),m68k)
96
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
97
 
-       CPU_ARCH        = m68k
98
 
+CPU_ARCH               = $(OS_TEST)
99
 
+
100
 
+ifeq ($(KERNEL),linux)
101
 
+       OS_REL_CFLAGS   = -D_XOPEN_SOURCE -DLINUX1_2
102
 
+       ARCH            = linux
103
 
 else
104
 
+       OS_REL_CFLAGS   = -D_XOPEN_SOURCE
105
 
+       ARCH            = gnu
106
 
+endif
107
 
+
108
 
 ifeq ($(OS_TEST),ppc64)
109
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
110
 
        CPU_ARCH        = ppc
111
 
 ifeq ($(USE_64),1)
112
 
        ARCHFLAG        = -m64
113
 
 endif
114
 
 else
115
 
-ifeq ($(OS_TEST),ppc)
116
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
117
 
-       CPU_ARCH        = ppc
118
 
-else
119
 
 ifeq ($(OS_TEST),alpha)
120
 
-        OS_REL_CFLAGS   = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
121
 
-       CPU_ARCH        = alpha
122
 
-else
123
 
-ifeq ($(OS_TEST),ia64)
124
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
125
 
-       CPU_ARCH        = ia64
126
 
+        OS_REL_CFLAGS   += -D_ALPHA_
127
 
 else
128
 
 ifeq ($(OS_TEST),x86_64)
129
 
-ifeq ($(USE_64),1)
130
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
131
 
-       CPU_ARCH        = x86_64
132
 
-else
133
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
134
 
+ifneq ($(USE_64),1)
135
 
+       OS_REL_CFLAGS   += -Di386
136
 
        CPU_ARCH        = x86
137
 
        ARCHFLAG        = -m32
138
 
 endif
139
 
 else
140
 
-ifeq ($(OS_TEST),sparc)
141
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
142
 
-       CPU_ARCH        = sparc
143
 
-else
144
 
 ifeq ($(OS_TEST),sparc64)
145
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
146
 
        CPU_ARCH        = sparc
147
 
 else
148
 
 ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
149
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
150
 
        CPU_ARCH        = arm
151
 
 else
152
 
 ifeq ($(OS_TEST),parisc)
153
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
154
 
        CPU_ARCH        = hppa
155
 
 else
156
 
 ifeq ($(OS_TEST),parisc64)
157
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
158
 
        CPU_ARCH        = hppa
159
 
 else
160
 
-ifeq ($(OS_TEST),s390)
161
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
162
 
-       CPU_ARCH        = s390
163
 
-else
164
 
-ifeq ($(OS_TEST),s390x)
165
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
166
 
-       CPU_ARCH        = s390x
167
 
-else
168
 
-ifeq ($(OS_TEST),mips)
169
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
170
 
-       CPU_ARCH        = mips
171
 
-else
172
 
-       OS_REL_CFLAGS   = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
173
 
+ifeq (,$(filter-out i686 i586 i486 i386,$(OS_TEST)))
174
 
+       OS_REL_CFLAGS   += -Di386
175
 
        CPU_ARCH        = x86
176
 
 endif
177
 
 endif
178
 
 endif
179
 
 endif
180
 
 endif
181
 
 endif
182
 
 endif
183
 
 endif
184
 
-endif
185
 
-endif
186
 
-endif
187
 
-endif
188
 
-endif
189
 
-endif
190
 
 
191
 
 
192
 
 LIBC_TAG               = _glibc
193
 
 
194
 
-ifeq ($(OS_RELEASE),2.0)
195
 
+ifeq ($(KERNEL)-$(OS_RELEASE),linux-2.0)
196
 
        OS_REL_CFLAGS   += -DLINUX2_0
197
 
        MKSHLIB         = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
198
 
        ifdef MAPFILE
199
 
                MKSHLIB += -Wl,--version-script,$(MAPFILE)
200
 
        endif
201
 
        PROCESS_MAP_FILE = grep -v ';-' $< | \
202
 
          sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
203
 
 endif
204
 
@@ -157,22 +125,20 @@
205
 
 
206
 
 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
207
 
 OS_LIBS                        = $(OS_PTHREAD) -ldl -lc
208
 
 
209
 
 ifdef USE_PTHREADS
210
 
        DEFINES         += -D_REENTRANT
211
 
 endif
212
 
 
213
 
-ARCH                   = linux
214
 
-
215
 
 DSO_CFLAGS             = -fPIC
216
 
 DSO_LDOPTS             = -shared $(ARCHFLAG) -Wl,-z,defs
217
 
 DSO_LDFLAGS            =
218
 
 LDFLAGS                        += $(ARCHFLAG)
219
 
 
220
 
-# INCLUDES += -I/usr/include -Y/usr/include/linux
221
 
+# INCLUDES += -I/usr/include
222
 
 G++INCLUDES            = -I/usr/include/g++
223
 
 
224
 
 #
225
 
 # Always set CPU_TAG on Linux, OpenVMS, WINCE.
226
 
 #
227
 
 CPU_TAG = _$(CPU_ARCH)
228
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/Linux2.6.mk
229
 
===================================================================
230
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/coreconf/Linux2.6.mk 2007-08-17 18:25:22.000000000 +0000
231
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/Linux2.6.mk      2007-08-17 18:26:29.000000000 +0000
232
 
@@ -32,17 +32,20 @@
233
 
 # and other provisions required by the GPL or the LGPL. If you do not delete
234
 
 # the provisions above, a recipient may use your version of this file under
235
 
 # the terms of any one of the MPL, the GPL or the LGPL.
236
 
 #
237
 
 # ***** END LICENSE BLOCK *****
238
 
 
239
 
 include $(CORE_DEPTH)/coreconf/Linux.mk
240
 
 
241
 
+ifeq ($(KERNEL), linux)
242
 
 OS_REL_CFLAGS   += -DLINUX2_1
243
 
+endif
244
 
+
245
 
 MKSHLIB         = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
246
 
 
247
 
 ifdef MAPFILE
248
 
        MKSHLIB += -Wl,--version-script,$(MAPFILE)
249
 
 endif
250
 
 PROCESS_MAP_FILE = grep -v ';-' $< | \
251
 
         sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
252
 
 
253
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/arch.mk
254
 
===================================================================
255
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/coreconf/arch.mk     2007-08-17 18:27:09.000000000 +0000
256
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/arch.mk  2007-08-17 18:27:27.000000000 +0000
257
 
@@ -150,16 +150,24 @@
258
 
     OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
259
 
 endif
260
 
 
261
 
 ifeq ($(OS_ARCH),Linux)
262
 
     OS_RELEASE := $(subst ., ,$(OS_RELEASE))
263
 
     ifneq ($(words $(OS_RELEASE)),1)
264
 
        OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE))
265
 
     endif
266
 
+    KERNEL = linux
267
 
+endif
268
 
+
269
 
+# This check must be last.  Since all uses of OS_ARCH that follow affect only
270
 
+# userland, we can merge other Glibc systems with Linux here.
271
 
+ifneq (, $(filter GNU GNU_%, $(OS_ARCH)))
272
 
+OS_ARCH = Linux
273
 
+OS_RELEASE = 2.6
274
 
 endif
275
 
 
276
 
 #
277
 
 # For OS/2
278
 
 #
279
 
 ifeq ($(OS_ARCH),OS_2)
280
 
     OS_ARCH = OS2
281
 
     OS_RELEASE := $(shell uname -v)
282
 
Index: nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/config.mk
283
 
===================================================================
284
 
--- nss-trunk-3.12.0~alpha1b.orig/mozilla/security/coreconf/config.mk   2007-08-17 18:27:55.000000000 +0000
285
 
+++ nss-trunk-3.12.0~alpha1b/mozilla/security/coreconf/config.mk        2007-08-17 18:28:03.000000000 +0000
286
 
@@ -58,17 +58,17 @@
287
 
 #       (dependent upon <architecture> tags)                          #
288
 
 #                                                                     #
289
 
 #       We are moving towards just having a $(OS_TARGET).mk file      #
290
 
 #       as opposed to multiple $(OS_TARGET)$(OS_RELEASE).mk files,    #
291
 
 #       one for each OS release.                                      #
292
 
 #######################################################################
293
 
 
294
 
 TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
295
 
-              OpenVMS AIX
296
 
+              OpenVMS AIX GNU GNU_%
297
 
 
298
 
 ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
299
 
 include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
300
 
 else
301
 
 include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk
302
 
 endif
303
 
 
304
 
 #######################################################################