fixup commit for branch 'DOUGT_CHANNEL_CHANGES_01222001_BRANCH' DOUGT_CHANNEL_CHANGES_01222001_BRANCH DOUGT_CHANNEL_CHANGES_01222001_BASE
authorcvs2hg
Mon, 22 Jan 2001 19:38:05 +0000
branchDOUGT_CHANNEL_CHANGES_01222001_BRANCH
changeset 1130 6552b1568bdd889455ed2ebb087ec45490331cbb
parent 908 a5194743a3a75ea4fef99a22118fd6096d06bcd8
child 13888 41988e6c8368b51c9bf093826040257e5a6ab85a
push idunknown
push userunknown
push dateunknown
fixup commit for branch 'DOUGT_CHANNEL_CHANGES_01222001_BRANCH'
security/coreconf/Linux.mk
security/coreconf/SunOS5.8_i86pc.mk
security/nss/lib/freebl/mpi/mpi_x86.s
security/nss/lib/nss/nssinit.c
--- a/security/coreconf/Linux.mk
+++ b/security/coreconf/Linux.mk
@@ -46,27 +46,37 @@ endif
 
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 DEFAULT_COMPILER = gcc
 
 ifeq ($(OS_TEST),ppc)
-	OS_REL_CFLAGS	= -DMACLINUX -DLINUX1_2
+	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH	= ppc
 else
 ifeq ($(OS_TEST),alpha)
         OS_REL_CFLAGS   = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
 	CPU_ARCH	= alpha
 else
+ifeq ($(OS_TEST),sparc)
+	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+	CPU_ARCH        = sparc
+else
+ifeq ($(OS_TEST),sparc64)
+	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+	CPU_ARCH        = sparc
+else
 	OS_REL_CFLAGS	= -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
 	CPU_ARCH	= x86
 endif
 endif
+endif
+endif
 
 
 LIBC_TAG		= _glibc
 
 ifeq ($(OS_RELEASE),2.0)
 	OS_REL_CFLAGS	+= -DLINUX2_0
 	MKSHLIB		= $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
 	ifdef BUILD_OPT
new file mode 100644
--- /dev/null
+++ b/security/coreconf/SunOS5.8_i86pc.mk
@@ -0,0 +1,47 @@
+#
+# 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 Netscape are 
+# Copyright (C) 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.
+#
+# Config stuff for Solaris 8 on x86
+# 
+
+SOL_CFLAGS	= -D_SVID_GETTOD
+
+include $(CORE_DEPTH)/coreconf/SunOS5.mk
+
+CPU_ARCH		= x86
+OS_DEFINES		+= -Di386
+
+ifeq ($(OS_RELEASE),5.8_i86pc)
+	OS_DEFINES += -DSOLARIS2_8
+endif
+
+OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
--- a/security/nss/lib/freebl/mpi/mpi_x86.s
+++ b/security/nss/lib/freebl/mpi/mpi_x86.s
@@ -59,16 +59,17 @@
 .globl	s_mpv_mul_d
 .type	s_mpv_mul_d,@function
 s_mpv_mul_d:
     push   %ebp
     mov    %esp,%ebp
     sub    $28,%esp
     push   %edi
     push   %esi
+    push   %ebx
     movl   $0,%ebx		# carry = 0
     mov    12(%ebp),%ecx	# ecx = a_len
     mov    20(%ebp),%edi
     cmp    $0,%ecx
     je     2f			# jmp if a_len == 0
     mov    8(%ebp),%esi		# esi = a
     cld
 1:
@@ -80,16 +81,17 @@ 1:
     adc    $0,%edx
     mov    %edx,%ebx		# high half of product becomes next carry
 
     stosl			# [es:edi] = ax; edi += 4;
     dec    %ecx			# --a_len
     jnz    1b			# jmp if a_len != 0
 2:
     mov    %ebx,0(%edi)		# *c = carry
+    pop    %ebx
     pop    %esi
     pop    %edi
     leave  
     ret    
     nop
 
  #  ebp - 36:	caller's esi
  #  ebp - 32:	caller's edi
@@ -116,16 +118,17 @@ 2:
 .globl	s_mpv_mul_d_add
 .type	s_mpv_mul_d_add,@function
 s_mpv_mul_d_add:
     push   %ebp
     mov    %esp,%ebp
     sub    $28,%esp
     push   %edi
     push   %esi
+    push   %ebx
     movl   $0,%ebx		# carry = 0
     mov    12(%ebp),%ecx	# ecx = a_len
     mov    20(%ebp),%edi
     cmp    $0,%ecx
     je     4f			# jmp if a_len == 0
     mov    8(%ebp),%esi		# esi = a
     cld
 3:
@@ -140,16 +143,17 @@ 3:
     adc    $0,%edx
     mov    %edx,%ebx		# high half of product becomes next carry
 
     stosl			# [es:edi] = ax; edi += 4;
     dec    %ecx			# --a_len
     jnz    3b			# jmp if a_len != 0
 4:
     mov    %ebx,0(%edi)		# *c = carry
+    pop    %ebx
     pop    %esi
     pop    %edi
     leave  
     ret    
     nop
 
  #  ebp - 36:	caller's esi
  #  ebp - 32:	caller's edi
@@ -176,16 +180,17 @@ 4:
 .globl	s_mpv_mul_d_add_prop
 .type	s_mpv_mul_d_add_prop,@function
 s_mpv_mul_d_add_prop:
     push   %ebp
     mov    %esp,%ebp
     sub    $28,%esp
     push   %edi
     push   %esi
+    push   %ebx
     movl   $0,%ebx		# carry = 0
     mov    12(%ebp),%ecx	# ecx = a_len
     mov    20(%ebp),%edi
     cmp    $0,%ecx
     je     6f			# jmp if a_len == 0
     cld
     mov    8(%ebp),%esi		# esi = a
 5:
@@ -211,16 +216,17 @@ 6:
     stosl			# [es:edi] = ax; edi += 4;
     jnc    8f
 7:
     mov    0(%edi),%eax		# add in current word from *c
     adc	   $0,%eax
     stosl			# [es:edi] = ax; edi += 4;
     jc     7b
 8:
+    pop    %ebx
     pop    %esi
     pop    %edi
     leave  
     ret    
     nop
 
  #  ebp - 20:	caller's esi
  #  ebp - 16:	caller's edi
@@ -244,16 +250,17 @@ 8:
 .globl	s_mpv_sqr_add_prop
 .type	s_mpv_sqr_add_prop,@function
 s_mpv_sqr_add_prop:
      push   %ebp
      mov    %esp,%ebp
      sub    $12,%esp
      push   %edi
      push   %esi
+     push   %ebx
      movl   $0,%ebx		# carry = 0
      mov    12(%ebp),%ecx	# a_len
      mov    16(%ebp),%edi	# edi = ps
      cmp    $0,%ecx
      je     11f			# jump if a_len == 0
      cld
      mov    8(%ebp),%esi	# esi = pa
 10:
@@ -281,52 +288,55 @@ 11:
     stosl			# [es:edi] = ax; edi += 4;
     jnc    14f
 12:
     mov    0(%edi),%eax		# add in current word from *c
     adc	   $0,%eax
     stosl			# [es:edi] = ax; edi += 4;
     jc     12b
 14:
+    pop    %ebx
     pop    %esi
     pop    %edi
     leave  
     ret    
     nop
 
  #
  # Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized
  # so its high bit is 1.   This code is from NSPR.
  #
  # mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor,
  # 		          mp_digit *qp, mp_digit *rp)
 
- # Dump of assembler code for function s_mpv_div_2dx1d:
- # 
- #  esp +  0:	return address
- #  esp +  4:	Nhi	argument
- #  esp +  8:	Nlo	argument
- #  esp + 12:	divisor	argument
- #  esp + 16:	qp	argument
- #  esp + 20:   rp	argument
+ #  esp +  0:   Caller's ebx
+ #  esp +  4:	return address
+ #  esp +  8:	Nhi	argument
+ #  esp + 12:	Nlo	argument
+ #  esp + 16:	divisor	argument
+ #  esp + 20:	qp	argument
+ #  esp + 24:   rp	argument
  #  registers:
  # 	eax:
  #	ebx:	carry
  #	ecx:	a_len
  #	edx:
  #	esi:	a ptr
  #	edi:	c ptr
  # 
+
 .globl	s_mpv_div_2dx1d
 .type	s_mpv_div_2dx1d,@function
 s_mpv_div_2dx1d:
-       mov    4(%esp),%edx
-       mov    8(%esp),%eax
-       mov    12(%esp),%ebx
+       push   %ebx
+       mov    8(%esp),%edx
+       mov    12(%esp),%eax
+       mov    16(%esp),%ebx
        div    %ebx
-       mov    16(%esp),%ebx
+       mov    20(%esp),%ebx
        mov    %eax,0(%ebx)
-       mov    20(%esp),%ebx
+       mov    24(%esp),%ebx
        mov    %edx,0(%ebx)
        xor    %eax,%eax		# return zero
+       pop    %ebx
        ret    
        nop
   
--- a/security/nss/lib/nss/nssinit.c
+++ b/security/nss/lib/nss/nssinit.c
@@ -156,21 +156,21 @@ SECStatus
 nss_Init(const char *configdir, PRBool readOnly)
 {
     SECStatus status;
     SECStatus rv      = SECFailure;
 
     RNG_RNGInit();     		/* initialize random number generator */
     RNG_SystemInfoForRNG();
 
-    status = nss_OpenCertDB(configdir, PR_TRUE);
+    status = nss_OpenCertDB(configdir, readOnly);
     if (status != SECSuccess)
 	goto loser;
 
-    status = nss_OpenKeyDB(configdir, PR_TRUE);
+    status = nss_OpenKeyDB(configdir, readOnly);
     if (status != SECSuccess)
 	goto loser;
 
     status = nss_OpenSecModDB(configdir);
     if (status != SECSuccess)
 	goto loser;
 
     rv = SECSuccess;