summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2003-02-22 15:00:14 +0000
committercvs2hg <devnull@localhost>2003-02-22 15:00:14 +0000
commitdac74828c868677e37ee6dd2d35bc9cfe53116a1 (patch)
tree8c3683e6e22e47b5246f6b210e5e136d1487a6a3
parent5366f698d23d8a93d34de1725af84e44d4ee8c85 (diff)
downloadnspr-hg-dac74828c868677e37ee6dd2d35bc9cfe53116a1.tar.gz
fixup commit for branch 'NSPRPUB_PRE_4_2_CLIENT_BRANCH'
-rw-r--r--pkg/Makefile.in54
-rw-r--r--pkg/linux/Makefile.in44
-rw-r--r--pkg/linux/sun-nspr.spec122
-rw-r--r--pr/src/md/unix/os_Darwin_ppc.s92
4 files changed, 312 insertions, 0 deletions
diff --git a/pkg/Makefile.in b/pkg/Makefile.in
new file mode 100644
index 00000000..d12db9b6
--- /dev/null
+++ b/pkg/Makefile.in
@@ -0,0 +1,54 @@
+#
+# 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) 1998-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.
+#
+
+#! gmake
+
+MOD_DEPTH = ..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+DIRS =
+ifeq ($(OS_TARGET),Linux)
+DIRS = linux
+endif
+ifeq ($(OS_TARGET),SunOS)
+DIRS = solaris
+endif
+
+publish::
+ +$(LOOP_OVER_DIRS)
+
+include $(topsrcdir)/config/rules.mk
diff --git a/pkg/linux/Makefile.in b/pkg/linux/Makefile.in
new file mode 100644
index 00000000..aac22aab
--- /dev/null
+++ b/pkg/linux/Makefile.in
@@ -0,0 +1,44 @@
+#
+# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "$Id$"
+#
+
+MOD_DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+NAME = sun-nspr
+RELEASE = 1
+TOPDIR = /usr/src/redhat
+VERSION = `grep PR_VERSION $(dist_includedir)/prinit.h \
+ | sed -e 's/"$$//' -e 's/.*"//' -e 's/ .*//'`
+
+include $(MOD_DEPTH)/config/autoconf.mk
+
+publish:
+ $(MAKE) clean
+ mkdir -p usr/lib/mps
+ cp -L $(MOD_DEPTH)/dist/lib/* usr/lib/mps
+ mkdir -p usr/include/mps
+ cp -Lr $(MOD_DEPTH)/dist/include/* usr/include/mps
+ tar czvf $(NAME)-$(VERSION).tar.gz usr
+ echo "%define name $(NAME)" >$(NAME).spec
+ echo "%define version $(VERSION)" >>$(NAME).spec
+ echo "%define release $(RELEASE)" >>$(NAME).spec
+
+ cat $(srcdir)/$(NAME).spec >>$(NAME).spec
+ cp $(NAME)-$(VERSION).tar.gz $(TOPDIR)/SOURCES
+ rpm -ba $(NAME).spec
+ if [ ! -d RPMS ] ; then mkdir -p RPMS ; fi
+ if [ ! -d SRPMS ] ; then mkdir -p SRPMS ; fi
+ cp -v $(TOPDIR)/RPMS/i386/$(NAME)-$(VERSION)-* RPMS
+ cp -v $(TOPDIR)/RPMS/i386/$(NAME)-devel-$(VERSION)-* RPMS
+ cp -v $(TOPDIR)/SRPMS/$(NAME)-$(VERSION)-* SRPMS
+
+clean:
+ rm -rf $(TOPDIR)/BUILD/$(NAME)
+ rm -rf RPMS SRPMS usr
+ rm -f $(NAME)-$(VERSION).tar.gz
diff --git a/pkg/linux/sun-nspr.spec b/pkg/linux/sun-nspr.spec
new file mode 100644
index 00000000..1fed5048
--- /dev/null
+++ b/pkg/linux/sun-nspr.spec
@@ -0,0 +1,122 @@
+Summary: Netscape Portable Runtime
+Name: %{name}
+Vendor: Sun Microsystems
+Version: %{version}
+Release: %{release}
+Copyright: MPL/GPL
+Group: System Environment/Base
+Source: %{name}-%{version}.tar.gz
+ExclusiveOS: Linux
+BuildRoot: /var/tmp/%{name}-root
+
+%description
+
+NSPR provides platform independence for non-GUI operating system
+facilities. These facilities include threads, thread synchronization,
+normal file and network I/O, interval timing and calendar time, basic
+memory management (malloc and free) and shared library linking.
+
+See: http://www.mozilla.org/projects/nspr/about-nspr.html
+
+%package devel
+Summary: Development Libraries for the Netscape Portable Runtime
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for doing development with the Netscape Portable Runtime.
+
+%prep
+%setup -c
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir $RPM_BUILD_ROOT
+cd $RPM_BUILD_ROOT
+tar xvzf $RPM_SOURCE_DIR/%{name}-%{version}.tar.gz
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%dir /usr
+%dir /usr/lib
+%dir /usr/lib/mps
+/usr/lib/mps/libnspr4.so
+/usr/lib/mps/libplc4.so
+/usr/lib/mps/libplds4.so
+
+%files devel
+%defattr(-,root,root)
+/usr/lib/mps/libnspr4.a
+/usr/lib/mps/libplc4.a
+/usr/lib/mps/libplds4.a
+%dir /usr
+%dir /usr/include
+%dir /usr/include/mps
+%dir /usr/include/mps/nspr
+%dir /usr/include/mps/nspr/obsolete
+%dir /usr/include/mps/nspr/private
+/usr/include/mps/nspr/private/pprio.h
+/usr/include/mps/nspr/private/pprthred.h
+/usr/include/mps/nspr/private/prpriv.h
+/usr/include/mps/nspr/prcpucfg.h
+/usr/include/mps/nspr/obsolete/pralarm.h
+/usr/include/mps/nspr/obsolete/probslet.h
+/usr/include/mps/nspr/obsolete/protypes.h
+/usr/include/mps/nspr/obsolete/prsem.h
+/usr/include/mps/nspr/nspr.h
+/usr/include/mps/nspr/pratom.h
+/usr/include/mps/nspr/prbit.h
+/usr/include/mps/nspr/prclist.h
+/usr/include/mps/nspr/prcmon.h
+/usr/include/mps/nspr/prcountr.h
+/usr/include/mps/nspr/prcvar.h
+/usr/include/mps/nspr/prdtoa.h
+/usr/include/mps/nspr/prenv.h
+/usr/include/mps/nspr/prerr.h
+/usr/include/mps/nspr/prerror.h
+/usr/include/mps/nspr/prinet.h
+/usr/include/mps/nspr/prinit.h
+/usr/include/mps/nspr/prinrval.h
+/usr/include/mps/nspr/prio.h
+/usr/include/mps/nspr/pripcsem.h
+/usr/include/mps/nspr/prlink.h
+/usr/include/mps/nspr/prlock.h
+/usr/include/mps/nspr/prlog.h
+/usr/include/mps/nspr/prlong.h
+/usr/include/mps/nspr/prmem.h
+/usr/include/mps/nspr/prmon.h
+/usr/include/mps/nspr/prmwait.h
+/usr/include/mps/nspr/prnetdb.h
+/usr/include/mps/nspr/prolock.h
+/usr/include/mps/nspr/prpdce.h
+/usr/include/mps/nspr/prprf.h
+/usr/include/mps/nspr/prproces.h
+/usr/include/mps/nspr/prrng.h
+/usr/include/mps/nspr/prrwlock.h
+/usr/include/mps/nspr/prshma.h
+/usr/include/mps/nspr/prshm.h
+/usr/include/mps/nspr/prsystem.h
+/usr/include/mps/nspr/prthread.h
+/usr/include/mps/nspr/prtime.h
+/usr/include/mps/nspr/prtpool.h
+/usr/include/mps/nspr/prtrace.h
+/usr/include/mps/nspr/prtypes.h
+/usr/include/mps/nspr/prvrsion.h
+/usr/include/mps/nspr/prwin16.h
+/usr/include/mps/nspr/plarenas.h
+/usr/include/mps/nspr/plarena.h
+/usr/include/mps/nspr/plhash.h
+/usr/include/mps/nspr/plbase64.h
+/usr/include/mps/nspr/plerror.h
+/usr/include/mps/nspr/plgetopt.h
+/usr/include/mps/nspr/plresolv.h
+/usr/include/mps/nspr/plstr.h
+
+%changelog
+* Sat Jan 18 2003 Kirk Erickson <kirk.erickson@sun.com>
+- http://bugzilla.mozilla.org/show_bug.cgi?id=189501
diff --git a/pr/src/md/unix/os_Darwin_ppc.s b/pr/src/md/unix/os_Darwin_ppc.s
new file mode 100644
index 00000000..f38ac644
--- /dev/null
+++ b/pr/src/md/unix/os_Darwin_ppc.s
@@ -0,0 +1,92 @@
+# -*- 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) 2003 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.
+#
+
+#
+# Based on the programming examples in The PowerPC Architecture:
+# A Specification for A New Family of RISC Processors, 2nd Ed.,
+# Book I, Section E.1, "Synchronization," pp. 249-256, May 1994.
+#
+
+.text
+
+#
+# PRInt32 __PR_DarwinPPC_AtomicIncrement(PRInt32 *val);
+#
+ .align 2
+ .globl __PR_DarwinPPC_AtomicIncrement
+__PR_DarwinPPC_AtomicIncrement:
+ lwarx r4,0,r3
+ addi r0,r4,1
+ stwcx. r0,0,r3
+ bne- __PR_DarwinPPC_AtomicIncrement
+ mr r3,r0
+ blr
+
+#
+# PRInt32 __PR_DarwinPPC_AtomicDecrement(PRInt32 *val);
+#
+ .align 2
+ .globl __PR_DarwinPPC_AtomicDecrement
+__PR_DarwinPPC_AtomicDecrement:
+ lwarx r4,0,r3
+ addi r0,r4,-1
+ stwcx. r0,0,r3
+ bne- __PR_DarwinPPC_AtomicDecrement
+ mr r3,r0
+ blr
+
+#
+# PRInt32 __PR_DarwinPPC_AtomicSet(PRInt32 *val, PRInt32 newval);
+#
+ .align 2
+ .globl __PR_DarwinPPC_AtomicSet
+__PR_DarwinPPC_AtomicSet:
+ lwarx r5,0,r3
+ stwcx. r4,0,r3
+ bne- __PR_DarwinPPC_AtomicSet
+ mr r3,r5
+ blr
+
+#
+# PRInt32 __PR_DarwinPPC_AtomicAdd(PRInt32 *ptr, PRInt32 val);
+#
+ .align 2
+ .globl __PR_DarwinPPC_AtomicAdd
+__PR_DarwinPPC_AtomicAdd:
+ lwarx r5,0,r3
+ add r0,r4,r5
+ stwcx. r0,0,r3
+ bne- __PR_DarwinPPC_AtomicAdd
+ mr r3,r0
+ blr