From 1b14acdf07bd12c8ceceb0d2c31ceb95a8a26218 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Wed, 26 Feb 2003 23:53:44 +0000 Subject: [PATCH] Sync up the NSPRPUB_PRE_4_2_CLIENT_BRANCH with the trunk. git-svn-id: svn://10.0.0.236/branches/NSPRPUB_PRE_4_2_CLIENT_BRANCH@138558 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/Makefile.in | 6 +- mozilla/nsprpub/configure | 6 +- mozilla/nsprpub/configure.in | 8 +- mozilla/nsprpub/pkg/solaris/Makefile.com | 8 +- mozilla/nsprpub/pkg/solaris/Makefile.targ | 11 ++- mozilla/nsprpub/pr/include/md/_linux.cfg | 91 +++++++++++++++++++++++ mozilla/nsprpub/pr/include/md/_linux.h | 4 + mozilla/nsprpub/pr/src/io/priometh.c | 2 + mozilla/nsprpub/pr/src/io/prprf.c | 6 +- mozilla/nsprpub/pr/src/misc/prrng.c | 1 + 10 files changed, 123 insertions(+), 20 deletions(-) diff --git a/mozilla/nsprpub/Makefile.in b/mozilla/nsprpub/Makefile.in index c1313b86580..fd1ca83c0cd 100644 --- a/mozilla/nsprpub/Makefile.in +++ b/mozilla/nsprpub/Makefile.in @@ -150,9 +150,9 @@ endif 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." diff --git a/mozilla/nsprpub/configure b/mozilla/nsprpub/configure index a45f300a8bc..0d42989b943 100755 --- a/mozilla/nsprpub/configure +++ b/mozilla/nsprpub/configure @@ -5599,6 +5599,8 @@ 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 @@ -5633,10 +5635,6 @@ 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 diff --git a/mozilla/nsprpub/configure.in b/mozilla/nsprpub/configure.in index 6d70a277085..00605c1d28c 100644 --- a/mozilla/nsprpub/configure.in +++ b/mozilla/nsprpub/configure.in @@ -2453,6 +2453,8 @@ 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 @@ -2490,10 +2492,4 @@ 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]) diff --git a/mozilla/nsprpub/pkg/solaris/Makefile.com b/mozilla/nsprpub/pkg/solaris/Makefile.com index f206b7dfe73..4a941064d35 100644 --- a/mozilla/nsprpub/pkg/solaris/Makefile.com +++ b/mozilla/nsprpub/pkg/solaris/Makefile.com @@ -2,7 +2,7 @@ # Copyright 2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "$Id: Makefile.com,v 1.2.2.3 2003-02-26 15:21:06 wtc%netscape.com Exp $" +#ident "$Id: Makefile.com,v 1.2.2.4 2003-02-26 23:53:37 wtc%netscape.com Exp $" # MACH = $(shell mach) @@ -16,11 +16,13 @@ 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) diff --git a/mozilla/nsprpub/pkg/solaris/Makefile.targ b/mozilla/nsprpub/pkg/solaris/Makefile.targ index 1994aecf57b..76aa961f66b 100644 --- a/mozilla/nsprpub/pkg/solaris/Makefile.targ +++ b/mozilla/nsprpub/pkg/solaris/Makefile.targ @@ -2,14 +2,21 @@ # Copyright 2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "$Id: Makefile.targ,v 1.2.2.3 2003-02-26 15:21:08 wtc%netscape.com Exp $" +#ident "$Id: Makefile.targ,v 1.2.2.4 2003-02-26 23:53:37 wtc%netscape.com Exp $" # 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 . diff --git a/mozilla/nsprpub/pr/include/md/_linux.cfg b/mozilla/nsprpub/pr/include/md/_linux.cfg index 301f4590068..70f1f9d7b8b 100644 --- a/mozilla/nsprpub/pr/include/md/_linux.cfg +++ b/mozilla/nsprpub/pr/include/md/_linux.cfg @@ -414,6 +414,97 @@ #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" diff --git a/mozilla/nsprpub/pr/include/md/_linux.h b/mozilla/nsprpub/pr/include/md/_linux.h index 04b2ea74458..df2cfd406b9 100644 --- a/mozilla/nsprpub/pr/include/md/_linux.h +++ b/mozilla/nsprpub/pr/include/md/_linux.h @@ -59,6 +59,10 @@ #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 diff --git a/mozilla/nsprpub/pr/src/io/priometh.c b/mozilla/nsprpub/pr/src/io/priometh.c index b9279fad3a5..251d46a9e3e 100644 --- a/mozilla/nsprpub/pr/src/io/priometh.c +++ b/mozilla/nsprpub/pr/src/io/priometh.c @@ -34,6 +34,8 @@ */ #include "primpl.h" +#include + /*****************************************************************************/ /************************** Invalid I/O method object ************************/ /*****************************************************************************/ diff --git a/mozilla/nsprpub/pr/src/io/prprf.c b/mozilla/nsprpub/pr/src/io/prprf.c index 95c165a41cb..4fa197c1569 100644 --- a/mozilla/nsprpub/pr/src/io/prprf.c +++ b/mozilla/nsprpub/pr/src/io/prprf.c @@ -51,8 +51,10 @@ ** 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] diff --git a/mozilla/nsprpub/pr/src/misc/prrng.c b/mozilla/nsprpub/pr/src/misc/prrng.c index bc6c0cd8fcd..cb8371059a0 100644 --- a/mozilla/nsprpub/pr/src/misc/prrng.c +++ b/mozilla/nsprpub/pr/src/misc/prrng.c @@ -34,6 +34,7 @@ #include "primpl.h" +#include PRSize _pr_CopyLowBits( void *dst,