Sync up the NSPRPUB_PRE_4_2_CLIENT_BRANCH with the trunk. NSPRPUB_PRE_4_2_CLIENT_BRANCH
authorwtc%netscape.com
Wed, 26 Feb 2003 15:10:16 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 2728 24540c3677cd272dad8d9d63be2bcef67d6bafc3
parent 2727 966f791fda1c19f960ecd0891fc84c0e10a88ca2
child 2731 7fca3aecc622081cded70e26c7f6f36663831d82
push idunknown
push userunknown
push dateunknown
Sync up the NSPRPUB_PRE_4_2_CLIENT_BRANCH with the trunk.
Makefile.in
configure
configure.in
pkg/solaris/Makefile.com
pkg/solaris/Makefile.targ
pr/include/md/_linux.cfg
pr/include/md/_linux.h
pr/src/io/priometh.c
pr/src/io/prprf.c
pr/src/misc/prrng.c
--- a/Makefile.in
+++ b/Makefile.in
@@ -145,14 +145,14 @@ endif
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
 	cd $(OBJDIR_NAME); \
 	cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)/mdbinary.jar; \
 	cd include; \
 	cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
 	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)/mdheader.jar
 
-solarispkg:
-	@echo Making Solaris packages.
-	$(MAKE) -C pkg/solaris publish
+package:
+	@echo "cd pkg; $(MAKE) publish"
+	$(MAKE) -C pkg publish
 
 depend:
 	@echo "NSPR20 has no dependencies.  Skipped."
--- a/configure
+++ b/configure
@@ -5594,16 +5594,18 @@ config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile 
 lib/libc/include/Makefile 
 lib/libc/src/Makefile 
 lib/tests/Makefile
+pkg/Makefile
+pkg/linux/Makefile
 pkg/solaris/Makefile
 pkg/solaris/SUNWpr/Makefile
 pkg/solaris/SUNWprx/Makefile
 pr/Makefile 
 pr/include/Makefile 
 pr/include/md/Makefile 
 pr/include/obsolete/Makefile 
 pr/include/private/Makefile 
@@ -5628,20 +5630,16 @@ elif test -n "$USE_PTHREADS"; then
 elif test -n "$USE_BTHREADS"; then
     MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
 fi
 
 if test -n "$USE_CPLUS"; then
     MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
 fi
 
-if test ! -d pkg; then
-    mkdir pkg
-fi
-
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
 # scripts and configure runs.  It is not useful on other systems.
 # If it contains results you don't want to keep, you may remove or edit it.
 #
 # By default, configure uses ./config.cache as the cache file,
--- a/configure.in
+++ b/configure.in
@@ -2448,16 +2448,18 @@ config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile 
 lib/libc/include/Makefile 
 lib/libc/src/Makefile 
 lib/tests/Makefile
+pkg/Makefile
+pkg/linux/Makefile
 pkg/solaris/Makefile
 pkg/solaris/SUNWpr/Makefile
 pkg/solaris/SUNWprx/Makefile
 pr/Makefile 
 pr/include/Makefile 
 pr/include/md/Makefile 
 pr/include/obsolete/Makefile 
 pr/include/private/Makefile 
@@ -2485,15 +2487,9 @@ elif test -n "$USE_PTHREADS"; then
 elif test -n "$USE_BTHREADS"; then
     MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
 fi
 
 if test -n "$USE_CPLUS"; then
     MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
 fi
 
-dnl There is no pkg/Makefile.in, so AC_OUTPUT won't create the pkg directory
-dnl for us.
-if test ! -d pkg; then
-    mkdir pkg
-fi
-
 AC_OUTPUT([$MAKEFILES], [chmod +x config/nspr-config])
--- a/pkg/solaris/Makefile.com
+++ b/pkg/solaris/Makefile.com
@@ -11,20 +11,22 @@ PUBLISH_ROOT = $(DIST)
 ifeq ($(MOD_DEPTH),../..)
 ROOT = ROOT
 else
 ROOT = $(subst ../../,,$(MOD_DEPTH))/ROOT
 endif
 
 PKGARCHIVE = $(dist_libdir)/pkgarchive
 DATAFILES = copyright
-FILES = $(DATAFILES) pkginfo
+FILES = $(DATAFILES) pkginfo prototype
 
 PACKAGE = $(shell basename `pwd`)
 
-PRODUCT_VERSION = $(MOD_VERSION).$(MOD_MINOR).$(MOD_PATCH)
+PRODUCT_VERSION = $(shell grep PR_VERSION $(dist_includedir)/prinit.h \
+		   | sed -e 's/"$$//' -e 's/.*"//' -e 's/ .*//')
+
 LN = /usr/bin/ln
 
 CLOBBERFILES = $(FILES)
 
 include $(topsrcdir)/config/rules.mk
 
 # vim: ft=make
--- a/pkg/solaris/Makefile.targ
+++ b/pkg/solaris/Makefile.targ
@@ -4,17 +4,24 @@
 #
 #ident	"$Id$"
 #
 
 pkginfo: pkginfo.tmpl ../awk_pkginfo
 	$(RM) $@; nawk -f ../awk_pkginfo $< > $@
 
 # we need to copy prototype_sparc to current too find copyright in current
-pkg: $(PKGARCHIVE)
+prototype:  $(srcdir)/prototype_com $(srcdir)/prototype_$(MACH)
+	cat $(srcdir)/prototype_$(MACH) |  sed -e \
+'/^!include[ 	][ 	]*prototype_com/ r ./prototype_com' \
+-e 's/^!include[ 	][ 	]*prototype_com//g' >prototype
+
+
+
+pkg: $(PKGARCHIVE) prototype
 	cp $(srcdir)/prototype_com .
 	cp $(srcdir)/prototype_$(MACH) .
 	cp $(srcdir)/depend .
 	pkgmk -f prototype_$(MACH) -d $(PKGARCHIVE) -r $(ROOT) -o $(PACKAGE)
 
 $(PKGARCHIVE):
 	[ -d $(PKGARCHIVE) ] || mkdir -p $(PKGARCHIVE)
 
--- a/pr/include/md/_linux.cfg
+++ b/pr/include/md/_linux.cfg
@@ -409,16 +409,107 @@
 #define PR_ALIGN_OF_FLOAT   4
 #define PR_ALIGN_OF_DOUBLE  4
 #define PR_ALIGN_OF_POINTER 4
 #define PR_ALIGN_OF_WORD    4
 
 #define PR_BYTES_PER_WORD_LOG2   2
 #define PR_BYTES_PER_DWORD_LOG2  3
 
+#elif defined(__s390__)
+
+#define IS_BIG_ENDIAN 1
+#undef  IS_LITTLE_ENDIAN
+
+#define PR_BYTES_PER_BYTE   1
+#define PR_BYTES_PER_SHORT  2
+#define PR_BYTES_PER_INT    4
+#define PR_BYTES_PER_INT64  8
+#define PR_BYTES_PER_LONG   4
+#define PR_BYTES_PER_FLOAT  4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD   4
+#define PR_BYTES_PER_DWORD  8
+
+#define PR_BITS_PER_BYTE    8
+#define PR_BITS_PER_SHORT   16
+#define PR_BITS_PER_INT     32
+#define PR_BITS_PER_INT64   64
+#define PR_BITS_PER_LONG    32
+#define PR_BITS_PER_FLOAT   32
+#define PR_BITS_PER_DOUBLE  64
+#define PR_BITS_PER_WORD    32
+
+#define PR_BITS_PER_BYTE_LOG2   3
+#define PR_BITS_PER_SHORT_LOG2  4
+#define PR_BITS_PER_INT_LOG2    5
+#define PR_BITS_PER_INT64_LOG2  6
+#define PR_BITS_PER_LONG_LOG2   5
+#define PR_BITS_PER_FLOAT_LOG2  5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2   5
+
+#define PR_ALIGN_OF_SHORT   2
+#define PR_ALIGN_OF_INT     4
+#define PR_ALIGN_OF_LONG    4
+#define PR_ALIGN_OF_INT64   4
+#define PR_ALIGN_OF_FLOAT   4
+#define PR_ALIGN_OF_DOUBLE  4
+#define PR_ALIGN_OF_POINTER 4
+#define PR_ALIGN_OF_WORD    4
+
+#define PR_BYTES_PER_WORD_LOG2   2
+#define PR_BYTES_PER_DWORD_LOG2  3
+
+#elif defined(__s390x__)
+
+#define IS_BIG_ENDIAN 1
+#undef  IS_LITTLE_ENDIAN
+#define IS_64
+
+#define PR_BYTES_PER_BYTE   1
+#define PR_BYTES_PER_SHORT  2
+#define PR_BYTES_PER_INT    4
+#define PR_BYTES_PER_INT64  8
+#define PR_BYTES_PER_LONG   8
+#define PR_BYTES_PER_FLOAT  4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD   8
+#define PR_BYTES_PER_DWORD  8
+
+#define PR_BITS_PER_BYTE    8
+#define PR_BITS_PER_SHORT   16
+#define PR_BITS_PER_INT     32
+#define PR_BITS_PER_INT64   64
+#define PR_BITS_PER_LONG    64
+#define PR_BITS_PER_FLOAT   32
+#define PR_BITS_PER_DOUBLE  64
+#define PR_BITS_PER_WORD    64
+
+#define PR_BITS_PER_BYTE_LOG2   3
+#define PR_BITS_PER_SHORT_LOG2  4
+#define PR_BITS_PER_INT_LOG2    5
+#define PR_BITS_PER_INT64_LOG2  6
+#define PR_BITS_PER_LONG_LOG2   6
+#define PR_BITS_PER_FLOAT_LOG2  5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2   6
+
+#define PR_ALIGN_OF_SHORT   2
+#define PR_ALIGN_OF_INT     4
+#define PR_ALIGN_OF_LONG    8
+#define PR_ALIGN_OF_INT64   8
+#define PR_ALIGN_OF_FLOAT   4
+#define PR_ALIGN_OF_DOUBLE  8
+#define PR_ALIGN_OF_POINTER 8
+#define PR_ALIGN_OF_WORD    8
+
+#define PR_BYTES_PER_WORD_LOG2   3
+#define PR_BYTES_PER_DWORD_LOG2  3
+
 #else
 
 #error "Unknown CPU architecture"
 
 #endif
 
 #define	HAVE_LONG_LONG
 #if PR_ALIGN_OF_DOUBLE == 8
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -54,16 +54,20 @@
 #elif defined(__sparc__)
 #define _PR_SI_ARCHITECTURE "sparc"
 #elif defined(__i386__)
 #define _PR_SI_ARCHITECTURE "x86"
 #elif defined(__mips__)
 #define _PR_SI_ARCHITECTURE "mips"
 #elif defined(__arm__)
 #define _PR_SI_ARCHITECTURE "arm"
+#elif defined(__s390__)
+#define _PR_SI_ARCHITECTURE "s390"
+#elif defined(__s390x__)
+#define _PR_SI_ARCHITECTURE "s390x"
 #else
 #error "Unknown CPU architecture"
 #endif
 #define PR_DLL_SUFFIX		".so"
 
 #define _PR_VMBASE              0x30000000
 #define _PR_STACK_VMBASE	0x50000000
 #define _MD_DEFAULT_STACK_SIZE	65536L
--- a/pr/src/io/priometh.c
+++ b/pr/src/io/priometh.c
@@ -29,16 +29,18 @@
  * 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.
  */
 #include "primpl.h"
 
+#include <string.h>
+
 /*****************************************************************************/
 /************************** Invalid I/O method object ************************/
 /*****************************************************************************/
 PRIOMethods _pr_faulty_methods = {
     (PRDescType)0,
     (PRCloseFN)_PR_InvalidStatus,
     (PRReadFN)_PR_InvalidInt,
     (PRWriteFN)_PR_InvalidInt,
--- a/pr/src/io/prprf.c
+++ b/pr/src/io/prprf.c
@@ -46,18 +46,20 @@
 #include "prlong.h"
 #include "prlog.h"
 #include "prmem.h"
 
 /*
 ** Note: on some platforms va_list is defined as an array,
 ** and requires array notation.
 */
-#if (defined(LINUX) && defined(__powerpc__)) || defined(WIN16) || \
-    defined(QNX) || \
+#if (defined(LINUX) && defined(__powerpc__)) || \
+    (defined(LINUX) && defined(__s390__)) || \
+    (defined(LINUX) && defined(__s390x__)) || \
+    defined(WIN16) || defined(QNX) || \
     (defined(__NetBSD__) && defined(__powerpc__) && \
     __NetBSD_Version__ < 105000000)
 #define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
 #else
 #define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
 #endif
 
 /*
--- a/pr/src/misc/prrng.c
+++ b/pr/src/misc/prrng.c
@@ -29,16 +29,17 @@
  * 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.
  */
 
 #include "primpl.h"
 
+#include <string.h>
 
 PRSize _pr_CopyLowBits( 
     void *dst, 
     PRSize dstlen, 
     void *src, 
     PRSize srclen )
 {
     if (srclen <= dstlen) {