Skip to content

Commit

Permalink
Bug 461082, Deliver NSS 3.12.2 and NSPR 4.7.2 to Mozilla
Browse files Browse the repository at this point in the history
r=wtc
  • Loading branch information
kaie committed Oct 23, 2008
1 parent ca2234d commit 77debec
Show file tree
Hide file tree
Showing 138 changed files with 3,001 additions and 4,834 deletions.
10 changes: 9 additions & 1 deletion dbm/include/mcom_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
#define LITTLE_ENDIAN 1234
#endif

#ifdef _WINDOWS
#if defined(_WINDOWS) || defined(XP_OS2_VACPP)
#ifdef BYTE_ORDER
#undef BYTE_ORDER
#endif
Expand Down Expand Up @@ -188,6 +188,14 @@
#define MAXPATHLEN 1024
#endif

#ifdef XP_OS2_VACPP
#include <os2.h>
#define MAXPATHLEN CCHMAXPATH
#define EPERM EINVAL
#define ENOTDIR EBADPOS
#define S_ISDIR(s) ((s) & S_IFDIR)
#endif

#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */

#ifndef STDERR_FILENO
Expand Down
2 changes: 1 addition & 1 deletion dbm/src/h_bigkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94";
* collect_data
*/

#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <sys/param.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion dbm/src/h_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94";
#include <stdlib.h>
#include <string.h>

#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <unistd.h>
#endif

Expand Down
6 changes: 3 additions & 3 deletions dbm/src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";

#include "watcomfx.h"

#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <sys/param.h>
#endif

#if !defined(macintosh)
#ifdef XP_OS2
#ifdef XP_OS2_EMX
#include <sys/types.h>
#endif
#include <sys/stat.h>
Expand All @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#include <stdlib.h>
#include <string.h>

#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <unistd.h>
#endif
#if defined(_WIN32) || defined(_WINDOWS)
Expand Down
2 changes: 1 addition & 1 deletion dbm/src/hash_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94";
* Internal
* newbuf
*/
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <sys/param.h>
#endif

Expand Down
6 changes: 5 additions & 1 deletion dbm/src/mktemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#include <ctype.h>
#include "mcom_db.h"

#ifndef _WINDOWS
#if !defined(_WINDOWS) && !defined(XP_OS2_VACPP)
#include <unistd.h>
#endif

#ifdef XP_OS2_VACPP
#include <process.h>
#endif

#ifdef _WINDOWS
#include <process.h>
#include "winfile.h"
Expand Down
6 changes: 3 additions & 3 deletions dbm/src/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#include <ncompat.h>

/* The OS/2 VAC compiler doesn't appear to define __STDC__ and won't let us define it either */
#ifdef __STDC__
#if defined(__STDC__) || defined(XP_OS2_VACPP)
#include <stdarg.h>
#else
#include <varargs.h>
#endif

int
#ifdef __STDC__
#if defined(__STDC__) || defined(XP_OS2_VACPP)
snprintf(char *str, size_t n, const char *fmt, ...)
#else
snprintf(str, n, fmt, va_alist)
Expand All @@ -39,7 +39,7 @@ snprintf(str, n, fmt, va_alist)
#else
int rval;
#endif
#ifdef __STDC__
#if defined(__STDC__) || defined(XP_OS2_VACPP)
va_start(ap, fmt);
#else
va_start(ap);
Expand Down
5 changes: 3 additions & 2 deletions nsprpub/pkg/linux/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#
# ***** END LICENSE BLOCK *****
#
#ident "$Id: Makefile.in,v 1.10 2005/11/18 21:50:20 christophe.ravel.bugs%sun.com Exp $"
#ident "$Id: Makefile.in,v 1.11 2008/10/20 22:38:45 christophe.ravel.bugs%sun.com Exp $"
#

MOD_DEPTH = ../..
Expand Down Expand Up @@ -74,7 +74,7 @@ publish:
(cd $(dist_includedir) && tar cphf - .) \
| (mkdir -p opt/sun/private/include/nspr && cd opt/sun/private/include/nspr && tar xvfBp -)
(cd opt/sun/private/include/nspr && \
rm -rf md private obsolete/pralarm.h obsolete/probslet.h obsolete/prsem.h)
rm -rf md)
tar czvf SOURCES/$(NAME)-$(VERSION).tar.gz opt
echo "%define name $(NAME)" >$(SPECFILE)
echo "%define version $(VERSION)" >>$(SPECFILE)
Expand All @@ -100,6 +100,7 @@ publish:
echo "%dir /opt/sun/private/include" >>$(SPECFILE)
echo "%dir /opt/sun/private/include/nspr" >>$(SPECFILE)
echo "%dir /opt/sun/private/include/nspr/obsolete" >>$(SPECFILE)
echo "%dir /opt/sun/private/include/nspr/private" >>$(SPECFILE)
find opt -type f \( -name "*.h" \) \
| sed -e "s-^-/-" >>$(SPECFILE)
rpmbuild $(RPMTARGET) -bb $(SPECFILE)
Expand Down
9 changes: 8 additions & 1 deletion nsprpub/pkg/solaris/SUNWprd/prototype
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#
# ***** END LICENSE BLOCK *****
#
#ident "$Id: prototype,v 1.4 2006/04/05 20:57:09 wtchang%redhat.com Exp $"
#ident "$Id: prototype,v 1.5 2008/10/20 22:38:46 christophe.ravel.bugs%sun.com Exp $"
#
# This required package information file contains a list of package contents.
# The 'pkgmk' command uses this file to identify the contents of a package
Expand All @@ -63,7 +63,11 @@ d none usr 0755 root sys
d none usr/include 0755 root bin
d none usr/include/mps 0755 root bin
d none usr/include/mps/obsolete 0755 root bin
d none usr/include/mps/private 0755 root bin
f none usr/include/mps/obsolete/pralarm.h 0644 root bin
f none usr/include/mps/obsolete/probslet.h 0644 root bin
f none usr/include/mps/obsolete/protypes.h 0644 root bin
f none usr/include/mps/obsolete/prsem.h 0644 root bin
f none usr/include/mps/prcpucfg.h 0644 root bin
f none usr/include/mps/nspr.h 0644 root bin
f none usr/include/mps/pratom.h 0644 root bin
Expand All @@ -81,6 +85,9 @@ f none usr/include/mps/prinit.h 0644 root bin
f none usr/include/mps/prinrval.h 0644 root bin
f none usr/include/mps/prio.h 0644 root bin
f none usr/include/mps/pripcsem.h 0644 root bin
f none usr/include/mps/private/pprio.h 0644 root bin
f none usr/include/mps/private/pprthred.h 0644 root bin
f none usr/include/mps/private/prpriv.h 0644 root bin
f none usr/include/mps/prlink.h 0644 root bin
f none usr/include/mps/prlock.h 0644 root bin
f none usr/include/mps/prlog.h 0644 root bin
Expand Down
4 changes: 2 additions & 2 deletions nsprpub/pr/include/prinit.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
#define PR_VERSION "4.7.2 Beta 4"
#define PR_VERSION "4.7.2"
#define PR_VMAJOR 4
#define PR_VMINOR 7
#define PR_VPATCH 2
#define PR_BETA PR_TRUE
#define PR_BETA PR_FALSE

/*
** PRVersionCheck
Expand Down
40 changes: 24 additions & 16 deletions nsprpub/pr/src/misc/prtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -1698,29 +1698,37 @@ PR_FormatTime(char *buf, int buflen, const char *fmt, const PRExplodedTime *tm)
{
size_t rv;
struct tm a;
a.tm_sec = tm->tm_sec;
a.tm_min = tm->tm_min;
a.tm_hour = tm->tm_hour;
a.tm_mday = tm->tm_mday;
a.tm_mon = tm->tm_month;
a.tm_wday = tm->tm_wday;
a.tm_year = tm->tm_year - 1900;
a.tm_yday = tm->tm_yday;
a.tm_isdst = tm->tm_params.tp_dst_offset ? 1 : 0;
struct tm *ap;

if (tm) {
ap = &a;
a.tm_sec = tm->tm_sec;
a.tm_min = tm->tm_min;
a.tm_hour = tm->tm_hour;
a.tm_mday = tm->tm_mday;
a.tm_mon = tm->tm_month;
a.tm_wday = tm->tm_wday;
a.tm_year = tm->tm_year - 1900;
a.tm_yday = tm->tm_yday;
a.tm_isdst = tm->tm_params.tp_dst_offset ? 1 : 0;

/*
* On some platforms, for example SunOS 4, struct tm has two additional
* fields: tm_zone and tm_gmtoff.
*/
/*
* On some platforms, for example SunOS 4, struct tm has two
* additional fields: tm_zone and tm_gmtoff.
*/

#if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) \
|| defined(NETBSD) || defined(OPENBSD) || defined(FREEBSD) \
|| defined(DARWIN) || defined(SYMBIAN)
a.tm_zone = NULL;
a.tm_gmtoff = tm->tm_params.tp_gmt_offset + tm->tm_params.tp_dst_offset;
a.tm_zone = NULL;
a.tm_gmtoff = tm->tm_params.tp_gmt_offset +
tm->tm_params.tp_dst_offset;
#endif
} else {
ap = NULL;
}

rv = strftime(buf, buflen, fmt, &a);
rv = strftime(buf, buflen, fmt, ap);
if (!rv && buf && buflen > 0) {
/*
* When strftime fails, the contents of buf are indeterminate.
Expand Down
29 changes: 26 additions & 3 deletions nsprpub/pr/tests/formattm.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,39 @@
int main()
{
char buffer[256];
char small_buffer[8];
PRTime now;
PRExplodedTime tod;

now = PR_Now();
PR_ExplodeTime(now, PR_LocalTimeParameters, &tod);
(void)PR_FormatTime(buffer, sizeof(buffer),
"%a %b %d %H:%M:%S %Z %Y", &tod);
printf("%s\n", buffer);

if (PR_FormatTime(buffer, sizeof(buffer),
"%a %b %d %H:%M:%S %Z %Y", &tod) != 0) {
printf("%s\n", buffer);
} else {
fprintf(stderr, "PR_FormatTime(buffer) failed\n");
return 1;
}

small_buffer[0] = '?';
if (PR_FormatTime(small_buffer, sizeof(small_buffer),
"%a %b %d %H:%M:%S %Z %Y", &tod) == 0) {
if (small_buffer[0] != '\0') {
fprintf(stderr, "PR_FormatTime(small_buffer) did not output "
"an empty string on failure\n");
return 1;
}
printf("%s\n", small_buffer);
} else {
fprintf(stderr, "PR_FormatTime(small_buffer) succeeded "
"unexpectedly\n");
return 1;
}

(void)PR_FormatTimeUSEnglish(buffer, sizeof(buffer),
"%a %b %d %H:%M:%S %Z %Y", &tod);
printf("%s\n", buffer);

return 0;
}
Empty file modified nsprpub/pr/tests/runtests.pl
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions security/coreconf/Linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,6 @@ G++INCLUDES = -I/usr/include/g++
# Always set CPU_TAG on Linux, OpenVMS, WINCE.
#
CPU_TAG = _$(CPU_ARCH)

USE_SYSTEM_ZLIB = 1
ZLIB_LIBS = -lz
4 changes: 3 additions & 1 deletion security/coreconf/UNIX.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ ifdef BUILD_OPT
DEFINES += -UDEBUG -DNDEBUG
else
OPTIMIZER += -g
DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
USERNAME := $(shell whoami)
USERNAME := $(subst -,_,$(USERNAME))
DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME)
endif

ifdef BUILD_TREE
Expand Down
74 changes: 0 additions & 74 deletions security/coreconf/WINNT6.0.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,77 +76,3 @@ OS_CFLAGS += -GT
DEFINES += -DWINNT

NSPR31_LIB_PREFIX = lib
#
# ***** 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):
# Robert Longson <[email protected]>
#
# 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 *****

#
# Config stuff for WINNT 6.0 (Windows Vista)
#
# This makefile defines the following variables:
# OS_CFLAGS and OS_DLLFLAGS.

include $(CORE_DEPTH)/coreconf/WIN32.mk

ifeq ($(CPU_ARCH), x386)
OS_CFLAGS += -W3 -nologo
DEFINES += -D_X86_
else
ifeq ($(CPU_ARCH), MIPS)
#OS_CFLAGS += -W3 -nologo
#DEFINES += -D_MIPS_
OS_CFLAGS += -W3 -nologo
else
ifeq ($(CPU_ARCH), ALPHA)
OS_CFLAGS += -W3 -nologo
DEFINES += -D_ALPHA_=1
endif
endif
endif

OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
ifndef MOZ_DEBUG_SYMBOLS
OS_DLLFLAGS += -PDB:NONE
endif

#
# Win NT needs -GT so that fibers can work
#
OS_CFLAGS += -GT
DEFINES += -DWINNT

NSPR31_LIB_PREFIX = lib
2 changes: 2 additions & 0 deletions security/coreconf/nsinstall/nsinstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ main(int argc, char **argv)
if (!exists && symlink(name, toname) < 0) {
if (errno == EEXIST) {
fprintf(stderr, "symlink creation race: %s\n", toname);
fail("symlink was attempted in working directory %s "
"from %s to %s.\n", cwd, name, toname);
goto retry;
}
diagnosePath(toname);
Expand Down
Loading

0 comments on commit 77debec

Please sign in to comment.