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(-)
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
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__) \
28
#include <sys/times.h>
30
#define getdtablesize() sysconf(_SC_OPEN_MAX)
33
GetHighResClock(void *buf, size_t maxbytes)
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
41
if (!pMutex->u.sslLock) {
42
PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
45
PR_Lock(pMutex->u.sslLock);
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__)
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
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__)
75
#include <sys/types.h>
79
PRBool isMultiProcess;
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
93
DEFAULT_COMPILER = gcc
95
-ifeq ($(OS_TEST),m68k)
96
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
98
+CPU_ARCH = $(OS_TEST)
100
+ifeq ($(KERNEL),linux)
101
+ OS_REL_CFLAGS = -D_XOPEN_SOURCE -DLINUX1_2
104
+ OS_REL_CFLAGS = -D_XOPEN_SOURCE
108
ifeq ($(OS_TEST),ppc64)
109
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
115
-ifeq ($(OS_TEST),ppc)
116
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
119
ifeq ($(OS_TEST),alpha)
120
- OS_REL_CFLAGS = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
123
-ifeq ($(OS_TEST),ia64)
124
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
126
+ OS_REL_CFLAGS += -D_ALPHA_
128
ifeq ($(OS_TEST),x86_64)
130
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
133
- OS_REL_CFLAGS = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
135
+ OS_REL_CFLAGS += -Di386
140
-ifeq ($(OS_TEST),sparc)
141
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
144
ifeq ($(OS_TEST),sparc64)
145
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
148
ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
149
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
152
ifeq ($(OS_TEST),parisc)
153
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
156
ifeq ($(OS_TEST),parisc64)
157
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
160
-ifeq ($(OS_TEST),s390)
161
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
164
-ifeq ($(OS_TEST),s390x)
165
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
168
-ifeq ($(OS_TEST),mips)
169
- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
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
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)
199
MKSHLIB += -Wl,--version-script,$(MAPFILE)
201
PROCESS_MAP_FILE = grep -v ';-' $< | \
202
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
204
@@ -157,22 +125,20 @@
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
210
DEFINES += -D_REENTRANT
216
DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,-z,defs
218
LDFLAGS += $(ARCHFLAG)
220
-# INCLUDES += -I/usr/include -Y/usr/include/linux
221
+# INCLUDES += -I/usr/include
222
G++INCLUDES = -I/usr/include/g++
225
# Always set CPU_TAG on Linux, OpenVMS, WINCE.
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
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.
237
# ***** END LICENSE BLOCK *****
239
include $(CORE_DEPTH)/coreconf/Linux.mk
241
+ifeq ($(KERNEL), linux)
242
OS_REL_CFLAGS += -DLINUX2_1
245
MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
248
MKSHLIB += -Wl,--version-script,$(MAPFILE)
250
PROCESS_MAP_FILE = grep -v ';-' $< | \
251
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
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/-.*//')
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))
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)))
279
ifeq ($(OS_ARCH),OS_2)
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
287
# (dependent upon <architecture> tags) #
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
#######################################################################
294
TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
296
+ OpenVMS AIX GNU GNU_%
298
ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
299
include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
301
include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk
304
#######################################################################