summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2008-05-09 23:56:02 +0000
committerwtc%google.com <devnull@localhost>2008-05-09 23:56:02 +0000
commite60e2c081e012dcbe9156de25fc8c87a85233532 (patch)
treef0801e768f4e8e4a142d356b743690c3d23451ff
parent6973c41a9c395d83da6c15dfc9c77b8fdb503148 (diff)
downloadnss-hg-e60e2c081e012dcbe9156de25fc8c87a85233532.tar.gz
Bug 367664: added RISC OS support. The patch is contributed by
Peter Naulls <peter@chocky.org>. r=wtc. Modified Files: coreconf/config.mk coreconf/rules.mk coreconf/nsinstall/nsinstall.c nss/lib/freebl/unix_rand.c Added Files: coreconf/RISCOS.mk
-rw-r--r--security/coreconf/RISCOS.mk48
-rw-r--r--security/coreconf/config.mk2
-rw-r--r--security/coreconf/nsinstall/nsinstall.c2
-rw-r--r--security/coreconf/rules.mk4
-rw-r--r--security/nss/lib/freebl/unix_rand.c3
5 files changed, 56 insertions, 3 deletions
diff --git a/security/coreconf/RISCOS.mk b/security/coreconf/RISCOS.mk
new file mode 100644
index 000000000..94c2679ce
--- /dev/null
+++ b/security/coreconf/RISCOS.mk
@@ -0,0 +1,48 @@
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# 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 security libraries.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1994-2000
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+include $(CORE_DEPTH)/coreconf/UNIX.mk
+
+DLL_SUFFIX = a
+MKSHLIB = $(GCCSDK_INSTALL_CROSSBIN)/arm-unknown-riscos-ar cr
+
+OS_RELEASE =
+OS_TARGET = RISCOS
+
+ifdef BUILD_OPT
+ OPTIMIZER = -O2 -mpoke-function-name
+endif
diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk
index 962bff330..3f9c81bd1 100644
--- a/security/coreconf/config.mk
+++ b/security/coreconf/config.mk
@@ -63,7 +63,7 @@ endif
#######################################################################
TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
- OpenVMS AIX
+ OpenVMS AIX RISCOS
ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c
index 9a04cef69..cf309ece8 100644
--- a/security/coreconf/nsinstall/nsinstall.c
+++ b/security/coreconf/nsinstall/nsinstall.c
@@ -58,7 +58,7 @@ typedef unsigned int mode_t;
#define HAVE_LCHOWN
-#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN) || defined(BEOS)
+#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN) || defined(BEOS) || defined(__riscos__)
#undef HAVE_LCHOWN
#endif
diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk
index 424bccedf..f160e44e3 100644
--- a/security/coreconf/rules.mk
+++ b/security/coreconf/rules.mk
@@ -338,7 +338,11 @@ ifdef MT
endif # MSVC with manifest tool
endif
else
+ifeq ($(OS_TARGET),RISCOS)
+ $(MKSHLIB) $@ $(OBJS) $(SUB_SHLOBJS)
+else
$(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
+endif
chmod +x $@
ifeq ($(OS_TARGET),Darwin)
ifdef MAPFILE
diff --git a/security/nss/lib/freebl/unix_rand.c b/security/nss/lib/freebl/unix_rand.c
index b9664583c..aec738c09 100644
--- a/security/nss/lib/freebl/unix_rand.c
+++ b/security/nss/lib/freebl/unix_rand.c
@@ -185,7 +185,8 @@ static SECStatus RNG_kstat(PRUint32* fed)
#endif
#if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) \
- || defined(NETBSD) || defined(NTO) || defined(DARWIN) || defined(OPENBSD)
+ || defined(NETBSD) || defined(DARWIN) || defined(OPENBSD) \
+ || defined(NTO) || defined(__riscos__)
#include <sys/times.h>
#define getdtablesize() sysconf(_SC_OPEN_MAX)