diff --git a/mozilla/dbm/include/mcom_db.h b/mozilla/dbm/include/mcom_db.h index 629cb0f715b..904ff7685e2 100644 --- a/mozilla/dbm/include/mcom_db.h +++ b/mozilla/dbm/include/mcom_db.h @@ -36,10 +36,6 @@ #define _DB_H_ -#ifdef WINCE -#define off_t long -#endif - #ifndef macintosh #include #endif diff --git a/mozilla/dbm/include/winfile.h b/mozilla/dbm/include/winfile.h index 36b59f72126..e128991c458 100644 --- a/mozilla/dbm/include/winfile.h +++ b/mozilla/dbm/include/winfile.h @@ -31,12 +31,7 @@ typedef struct DIR_Struct { typedef unsigned long mode_t; typedef long uid_t; typedef long gid_t; - -#ifdef WINCE - typedef long ino_t; -#else typedef long off_t; -#endif typedef unsigned long nlink_t; #endif diff --git a/mozilla/dbm/src/Makefile.in b/mozilla/dbm/src/Makefile.in index ee5b1f48ba6..511b130eb09 100644 --- a/mozilla/dbm/src/Makefile.in +++ b/mozilla/dbm/src/Makefile.in @@ -53,10 +53,6 @@ include $(topsrcdir)/config/rules.mk DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) -ifeq ($(OS_ARCH),WINCE) -DEFINES += -D__STDC__ -DDBM_REOPEN_ON_FLUSH -endif - ifeq ($(OS_ARCH),AIX) OS_LIBS += -lc_r endif diff --git a/mozilla/dbm/src/mktemp.c b/mozilla/dbm/src/mktemp.c index d93da9f5b94..58224fa0478 100644 --- a/mozilla/dbm/src/mktemp.c +++ b/mozilla/dbm/src/mktemp.c @@ -78,14 +78,6 @@ mkstempflags(char *path, int extraFlags) return (_gettemp(path, &fd, extraFlags) ? fd : -1); } -#ifdef WINCE /* otherwise, use the one in libc */ -char * -mktemp(char *path) -{ - return(_gettemp(path, (int *)NULL, 0) ? path : (char *)NULL); -} -#endif - /* NB: This routine modifies its input string, and does not always restore it. ** returns 1 on success, 0 on failure. */ diff --git a/mozilla/security/coreconf/Linux.mk b/mozilla/security/coreconf/Linux.mk index ab5a4a7fb55..4417d1642ff 100644 --- a/mozilla/security/coreconf/Linux.mk +++ b/mozilla/security/coreconf/Linux.mk @@ -132,7 +132,7 @@ endif G++INCLUDES = -I/usr/include/g++ # -# Always set CPU_TAG on Linux, WINCE. +# Always set CPU_TAG on Linux. # CPU_TAG = _$(CPU_ARCH) diff --git a/mozilla/security/coreconf/WIN95.mk b/mozilla/security/coreconf/WIN95.mk index fe2aa050a78..fe5b43df316 100644 --- a/mozilla/security/coreconf/WIN95.mk +++ b/mozilla/security/coreconf/WIN95.mk @@ -11,5 +11,5 @@ include $(CORE_DEPTH)/coreconf/WIN32.mk DEFINES += -DWIN95 -# WINNT uses the lib prefix, Win95 and WinCE don't +# WINNT uses the lib prefix, Win95 doesn't NSPR31_LIB_PREFIX = $(NULL) diff --git a/mozilla/security/coreconf/WINCE.mk b/mozilla/security/coreconf/WINCE.mk deleted file mode 100644 index e246599b276..00000000000 --- a/mozilla/security/coreconf/WINCE.mk +++ /dev/null @@ -1,182 +0,0 @@ -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# -# Configuration common to all versions of Windows CE and Pocket PC x. -# - -ifeq ($(CPU_ARCH),x86) - DEFAULT_COMPILER = cl - CC = cl - CCC = cl -else -ifeq ($(CPU_ARCH),ARM) - DEFAULT_COMPILER = clarm - CC = clarm - CCC = clarm -else -include CPU_ARCH_is_not_recognized -include _$(CPU_ARCH) -endif -endif - -LINK = link -AR = lib -AR += -NOLOGO -OUT:"$@" -RANLIB = echo -BSDECHO = echo - -ifdef BUILD_TREE -NSINSTALL_DIR = $(BUILD_TREE)/nss -else -NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall -endif -NSINSTALL = nsinstall - -MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend -MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend.exe -# Note: MKDEPENDENCIES __MUST__ be a relative pathname, not absolute. -# If it is absolute, gmake will crash unless the named file exists. -MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk - -INSTALL = $(NSINSTALL) -MAKE_OBJDIR = mkdir -MAKE_OBJDIR += $(OBJDIR) -RC = rc.exe -GARBAGE += $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb -XP_DEFINE += -DXP_PC -LIB_SUFFIX = lib -DLL_SUFFIX = dll -OS_DLLFLAGS += -DLL - -EXTRA_EXE_LD_FLAGS += -ENTRY:mainWCRTStartup - -ifdef BUILD_OPT -# OS_CFLAGS += -MD - OPTIMIZER += -O2 - DEFINES += -UDEBUG -U_DEBUG -DNDEBUG - DLLFLAGS += -OUT:"$@" -else - # - # Define USE_DEBUG_RTL if you want to use the debug runtime library - # (RTL) in the debug build - # - ifdef USE_DEBUG_RTL -# OS_CFLAGS += -MDd - else -# OS_CFLAGS += -MD - endif - OPTIMIZER += -Od -Z7 - #OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od - DEFINES += -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_$(USERNAME) - DLLFLAGS += -DEBUG -DEBUGTYPE:CV -OUT:"$@" - LDFLAGS += -DEBUG -DEBUGTYPE:CV -endif - -# DEFINES += -DWIN32 - -ifdef MAPFILE - DLLFLAGS += -DEF:$(MAPFILE) -endif - -# Change PROCESS to put the mapfile in the correct format for this platform -PROCESS_MAP_FILE = cp $< $@ - -# -# The following is NOT needed for the NSPR 2.0 library. -# - -DEFINES += -D_WINDOWS - -# override default, which is ASFLAGS = CFLAGS -AS = ml.exe -ASFLAGS = -Cp -Sn -Zi -coff $(INCLUDES) - -# -# override the definitions of RELEASE_TREE found in tree.mk -# -ifndef RELEASE_TREE - ifdef BUILD_SHIP - ifdef USE_SHIPS - RELEASE_TREE = $(NTBUILD_SHIP) - else - RELEASE_TREE = //redbuild/components - endif - else - RELEASE_TREE = //redbuild/components - endif -endif - -# -# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk -# - -ifndef LIB_PREFIX - LIB_PREFIX = $(NULL) -endif - -ifndef DLL_PREFIX - DLL_PREFIX = $(NULL) -endif - -# -# override the definitions of various _SUFFIX symbols in suffix.mk -# - -# -# Object suffixes -# -ifndef OBJ_SUFFIX - OBJ_SUFFIX = .obj -endif - -# -# Assembler source suffixes -# -ifndef ASM_SUFFIX - ASM_SUFFIX = .asm -endif - -# -# Library suffixes -# - -ifndef IMPORT_LIB_SUFFIX - IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX) -endif - -ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING - DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX) -endif - -# -# Program suffixes -# -ifndef PROG_SUFFIX - PROG_SUFFIX = .exe -endif - -# -# override ruleset.mk, removing the "lib" prefix for library names, and -# adding the "32" after the LIBRARY_VERSION. -# -ifdef LIBRARY_NAME - SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll - IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib -endif - -# -# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY -# -ifndef TARGETS - TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM) -endif - - -# -# Always set CPU_TAG on Linux, WINCE. -# -CPU_TAG = _$(CPU_ARCH) - diff --git a/mozilla/security/coreconf/WINNT.mk b/mozilla/security/coreconf/WINNT.mk index 71dca0e7b21..6052e5694fc 100644 --- a/mozilla/security/coreconf/WINNT.mk +++ b/mozilla/security/coreconf/WINNT.mk @@ -16,5 +16,5 @@ DEFINES += -DWINNT # OS_CFLAGS += -GT -# WINNT uses the lib prefix, Win95 and WinCE don't +# WINNT uses the lib prefix, Win95 doesn't NSPR31_LIB_PREFIX = lib diff --git a/mozilla/security/coreconf/config.mk b/mozilla/security/coreconf/config.mk index 44fa4f79294..93a11d7c5b4 100644 --- a/mozilla/security/coreconf/config.mk +++ b/mozilla/security/coreconf/config.mk @@ -31,7 +31,7 @@ endif ####################################################################### TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ - AIX RISCOS WINNT WIN95 WINCE Linux + AIX RISCOS WINNT WIN95 Linux ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk diff --git a/mozilla/security/coreconf/rules.mk b/mozilla/security/coreconf/rules.mk index abeb13e2458..6443fd2e4d6 100644 --- a/mozilla/security/coreconf/rules.mk +++ b/mozilla/security/coreconf/rules.mk @@ -241,7 +241,7 @@ alltags: $(PROGRAM): $(OBJS) $(EXTRA_LIBS) @$(MAKE_OBJDIR) ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) - $(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)) $(EXTRA_EXE_LD_FLAGS) + $(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)) ifdef MT if test -f $@.manifest; then \ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ @@ -337,7 +337,7 @@ $(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX) @$(MAKE_OBJDIR) ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) $(MKPROG) $< -Fe$@ -link \ - $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(EXTRA_EXE_LD_FLAGS) + $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) ifdef MT if test -f $@.manifest; then \ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ diff --git a/mozilla/security/nss/Makefile b/mozilla/security/nss/Makefile index ea59ae5e70f..89b123ddd75 100644 --- a/mozilla/security/nss/Makefile +++ b/mozilla/security/nss/Makefile @@ -26,9 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### -ifeq ($(OS_TARGET),WINCE) -DIRS = lib # omit cmd since wince has no command line shell -endif + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/mozilla/security/nss/cmd/certutil/keystuff.c b/mozilla/security/nss/cmd/certutil/keystuff.c index 404ee208647..3004dc2ea77 100644 --- a/mozilla/security/nss/cmd/certutil/keystuff.c +++ b/mozilla/security/nss/cmd/certutil/keystuff.c @@ -14,10 +14,8 @@ #if defined(XP_WIN) || defined (XP_PC) #include -#ifndef WINCE #include #endif -#endif #if defined(__sun) && !defined(SVR4) extern int fclose(FILE*); @@ -96,7 +94,7 @@ UpdateRNG(void) /* Get random noise from keyboard strokes */ count = 0; while (count < sizeof randbuf) { -#if defined(XP_UNIX) || defined(WINCE) +#if defined(XP_UNIX) c = getc(stdin); #else c = getch(); diff --git a/mozilla/security/nss/cmd/lib/basicutil.c b/mozilla/security/nss/cmd/lib/basicutil.c index 49fb9aa5624..a560ca87577 100644 --- a/mozilla/security/nss/cmd/lib/basicutil.c +++ b/mozilla/security/nss/cmd/lib/basicutil.c @@ -17,10 +17,8 @@ #include "basicutil.h" #include -#if !defined(_WIN32_WCE) #include #include -#endif #ifdef XP_UNIX #include @@ -91,11 +89,7 @@ SECU_PrintSystemError(char *progName, char *msg, ...) va_start(args, msg); fprintf(stderr, "%s: ", progName); vfprintf(stderr, msg, args); -#if defined(_WIN32_WCE) - fprintf(stderr, ": %d\n", PR_GetOSError()); -#else fprintf(stderr, ": %s\n", strerror(errno)); -#endif va_end(args); } diff --git a/mozilla/security/nss/cmd/lib/config.mk b/mozilla/security/nss/cmd/lib/config.mk index 7d0621294ab..b8c03de796c 100644 --- a/mozilla/security/nss/cmd/lib/config.mk +++ b/mozilla/security/nss/cmd/lib/config.mk @@ -13,7 +13,3 @@ SHARED_LIBRARY = IMPORT_LIBRARY = PROGRAM = -ifeq (WINCE,$(OS_ARCH)) -CSRCS += wincemain.c -endif - diff --git a/mozilla/security/nss/cmd/lib/secpwd.c b/mozilla/security/nss/cmd/lib/secpwd.c index a51e3e23bda..2c4579d7879 100644 --- a/mozilla/security/nss/cmd/lib/secpwd.c +++ b/mozilla/security/nss/cmd/lib/secpwd.c @@ -20,7 +20,7 @@ #include /* for isatty() */ #endif -#if( defined(_WINDOWS) && !defined(_WIN32_WCE)) +#if defined(_WINDOWS) #include #include #define QUIET_FGETS quiet_fgets @@ -144,11 +144,8 @@ static char * quiet_fgets (char *buf, int length, FILE *input) while (1) { -#if defined (_WIN32_WCE) - c = getchar(); /* gets a character from stdin */ -#else c = getch(); /* getch gets a character from the console */ -#endif + if (c == '\b') { if (end > buf) diff --git a/mozilla/security/nss/cmd/lib/secutil.c b/mozilla/security/nss/cmd/lib/secutil.c index 0730b5711db..01a094e9dca 100644 --- a/mozilla/security/nss/cmd/lib/secutil.c +++ b/mozilla/security/nss/cmd/lib/secutil.c @@ -20,10 +20,8 @@ #include "secpkcs7.h" #include "secpkcs5.h" #include -#if !defined(_WIN32_WCE) #include #include -#endif #ifdef XP_UNIX #include diff --git a/mozilla/security/nss/cmd/lib/wincemain.c b/mozilla/security/nss/cmd/lib/wincemain.c deleted file mode 100644 index cd2f2baa322..00000000000 --- a/mozilla/security/nss/cmd/lib/wincemain.c +++ /dev/null @@ -1,33 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifdef WINCE -#include - -int -wmain(int argc, WCHAR **wargv) -{ - char **argv; - int i, ret; - - argv = malloc(argc * sizeof(char*)); - - for (i = 0; i < argc; i++) { - int len = WideCharToMultiByte(CP_ACP, 0, wargv[i], -1, NULL, 0, 0, 0); - argv[i] = malloc(len * sizeof(char)); - WideCharToMultiByte(CP_ACP, 0, wargv[i], -1, argv[i], len, 0, 0); - } - - ret = main(argc, argv); - - for (i = 0; i < argc; i++) { - free(argv[i]); - } - free(argv); - - return ret; -} - -#endif - diff --git a/mozilla/security/nss/cmd/platlibs.mk b/mozilla/security/nss/cmd/platlibs.mk index 4511385f1e0..332681dd4c6 100644 --- a/mozilla/security/nss/cmd/platlibs.mk +++ b/mozilla/security/nss/cmd/platlibs.mk @@ -53,7 +53,7 @@ PKIXLIB = \ $(DIST)/lib/$(LIB_PREFIX)pkixcertsel.$(LIB_SUFFIX) # can't do this in manifest.mn because OS_ARCH isn't defined there. -ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH))) +ifeq ($(OS_ARCH), WINNT) EXTRA_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ @@ -139,7 +139,7 @@ endif else # USE_STATIC_LIBS # can't do this in manifest.mn because OS_ARCH isn't defined there. -ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH))) +ifeq ($(OS_ARCH), WINNT) # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) EXTRA_LIBS += \ diff --git a/mozilla/security/nss/cmd/strsclnt/strsclnt.c b/mozilla/security/nss/cmd/strsclnt/strsclnt.c index bbe9d86345d..f66e108fcde 100644 --- a/mozilla/security/nss/cmd/strsclnt/strsclnt.c +++ b/mozilla/security/nss/cmd/strsclnt/strsclnt.c @@ -11,10 +11,8 @@ #include #endif #include -#if !defined(_WIN32_WCE) #include #include -#endif #include #include "plgetopt.h" diff --git a/mozilla/security/nss/lib/certhigh/ocsp.c b/mozilla/security/nss/lib/certhigh/ocsp.c index c67f4b840e3..53ea4af249f 100644 --- a/mozilla/security/nss/lib/certhigh/ocsp.c +++ b/mozilla/security/nss/lib/certhigh/ocsp.c @@ -6,7 +6,7 @@ * Implementation of OCSP services, for both client and server. * (XXX, really, mostly just for client right now, but intended to do both.) * - * $Id: ocsp.c,v 1.72 2012-09-22 13:41:58 wtc%google.com Exp $ + * $Id: ocsp.c,v 1.73 2012-11-14 01:14:09 wtc%google.com Exp $ */ #include "prerror.h" @@ -151,8 +151,8 @@ ocsp_CertRevokedAfter(ocspRevokedInfo *revokedInfo, int64 time); #define OCSP_TRACE_CERT(cert) dumpCertificate(cert) #define OCSP_TRACE_CERTID(certid) dumpCertID(certid) -#if (defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS) \ - || defined(XP_MACOSX)) && !defined(_WIN32_WCE) +#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS) \ + || defined(XP_MACOSX) #define NSS_HAVE_GETENV 1 #endif diff --git a/mozilla/security/nss/lib/ckfw/Makefile b/mozilla/security/nss/lib/ckfw/Makefile index 7fe16927942..6929748af0e 100644 --- a/mozilla/security/nss/lib/ckfw/Makefile +++ b/mozilla/security/nss/lib/ckfw/Makefile @@ -2,7 +2,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -MAKEFILE_CVS_ID = "@(#) $RCSfile: Makefile,v $ $Revision: 1.18 $ $Date: 2012-04-25 14:49:28 $" +MAKEFILE_CVS_ID = "@(#) $RCSfile: Makefile,v $ $Revision: 1.19 $ $Date: 2012-11-14 01:14:10 $" include manifest.mn include $(CORE_DEPTH)/coreconf/config.mk @@ -29,7 +29,7 @@ endif export:: private_export # can't do this in manifest.mn because OS_TARGET isn't defined there. -ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) # list omits WINCE +ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) ifdef NSS_BUILD_CAPI DIRS += capi endif diff --git a/mozilla/security/nss/lib/freebl/Makefile b/mozilla/security/nss/lib/freebl/Makefile index ce1255574b0..648adec14eb 100644 --- a/mozilla/security/nss/lib/freebl/Makefile +++ b/mozilla/security/nss/lib/freebl/Makefile @@ -115,7 +115,7 @@ ifeq (OS2,$(OS_TARGET)) DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN endif -ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) #omits WINCE +ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) ifndef USE_64 # 32-bit Windows ifdef NS_USE_GCC @@ -155,11 +155,6 @@ endif endif endif -ifeq ($(OS_TARGET),WINCE) - DEFINES += -DMP_ARGCHK=0 # no assert in WinCE - DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512 -endif - ifeq ($(OS_TARGET),IRIX) ifeq ($(USE_N32),1) ASFILES = mpi_mips.s diff --git a/mozilla/security/nss/lib/freebl/arcfour.c b/mozilla/security/nss/lib/freebl/arcfour.c index 55d1165e7a1..eb60f367242 100644 --- a/mozilla/security/nss/lib/freebl/arcfour.c +++ b/mozilla/security/nss/lib/freebl/arcfour.c @@ -32,11 +32,6 @@ #define USE_WORD #endif -#if defined(_WIN32_WCE) -#undef WORD -#define WORD ARC4WORD -#endif - #if (defined(IS_64)) typedef PRUint64 WORD; #else diff --git a/mozilla/security/nss/lib/freebl/config.mk b/mozilla/security/nss/lib/freebl/config.mk index e8abd722e08..cf76b4989c9 100644 --- a/mozilla/security/nss/lib/freebl/config.mk +++ b/mozilla/security/nss/lib/freebl/config.mk @@ -53,13 +53,11 @@ SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_ RES = $(OBJDIR)/$(LIBRARY_NAME).res RESNAME = freebl.rc -ifndef WINCE ifdef NS_USE_GCC OS_LIBS += -lshell32 else OS_LIBS += shell32.lib endif -endif ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ diff --git a/mozilla/security/nss/lib/freebl/mpi/mpi.h b/mozilla/security/nss/lib/freebl/mpi/mpi.h index f49e675bb88..642fe6fc487 100644 --- a/mozilla/security/nss/lib/freebl/mpi/mpi.h +++ b/mozilla/security/nss/lib/freebl/mpi/mpi.h @@ -6,7 +6,7 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id: mpi.h,v 1.25 2012-04-25 14:49:50 gerv%gerv.net Exp $ */ +/* $Id: mpi.h,v 1.26 2012-11-14 01:14:11 wtc%google.com Exp $ */ #ifndef _H_MPI_ #define _H_MPI_ @@ -29,11 +29,7 @@ #undef ULLONG_MAX #endif -#if defined( _WIN32_WCE) -/* #include What do we need here ?? */ -#else #include -#endif #define MP_NEG 1 #define MP_ZPOS 0 diff --git a/mozilla/security/nss/lib/freebl/mpi/mpmontg.c b/mozilla/security/nss/lib/freebl/mpi/mpmontg.c index 39af37e4994..2cdb98374f0 100644 --- a/mozilla/security/nss/lib/freebl/mpi/mpmontg.c +++ b/mozilla/security/nss/lib/freebl/mpi/mpmontg.c @@ -1,7 +1,7 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id: mpmontg.c,v 1.24 2012-04-25 14:49:50 gerv%gerv.net Exp $ */ +/* $Id: mpmontg.c,v 1.25 2012-11-14 01:14:11 wtc%google.com Exp $ */ /* This file implements moduluar exponentiation using Montgomery's * method for modular reduction. This file implements the method @@ -35,12 +35,6 @@ #define MAX_ODD_INTS 32 /* 2 ** (WINDOW_BITS - 1) */ -#if defined(_WIN32_WCE) -#define ABORT res = MP_UNDEF; goto CLEANUP -#else -#define ABORT abort() -#endif - /*! computes T = REDC(T), 2^b == R \param T < RN */ @@ -257,7 +251,7 @@ mp_err mp_exptmod_f(const mp_int * montBase, } else if (smallExp & 1) { SQR; MUL(0); } else { - ABORT; + abort(); } } else if (window_bits == 4) { if (!smallExp) { @@ -271,7 +265,7 @@ mp_err mp_exptmod_f(const mp_int * montBase, } else if (smallExp & 8) { SQR; MUL(smallExp/16); SQR; SQR; SQR; } else { - ABORT; + abort(); } } else if (window_bits == 5) { if (!smallExp) { @@ -287,7 +281,7 @@ mp_err mp_exptmod_f(const mp_int * montBase, } else if (smallExp & 0x10) { SQR; MUL(smallExp/32); SQR; SQR; SQR; SQR; } else { - ABORT; + abort(); } } else if (window_bits == 6) { if (!smallExp) { @@ -305,10 +299,10 @@ mp_err mp_exptmod_f(const mp_int * montBase, } else if (smallExp & 0x20) { SQR; MUL(smallExp/64); SQR; SQR; SQR; SQR; SQR; } else { - ABORT; + abort(); } } else { - ABORT; + abort(); } } @@ -405,7 +399,7 @@ mp_err mp_exptmod_i(const mp_int * montBase, } else if (smallExp & 1) { SQR(pa1,pa2); MUL(0,pa2,pa1); } else { - ABORT; + abort(); } } else if (window_bits == 4) { if (!smallExp) { @@ -423,7 +417,7 @@ mp_err mp_exptmod_i(const mp_int * montBase, SQR(pa1,pa2); MUL(smallExp/16,pa2,pa1); SQR(pa1,pa2); SQR(pa2,pa1); SQR(pa1,pa2); SWAPPA; } else { - ABORT; + abort(); } } else if (window_bits == 5) { if (!smallExp) { @@ -445,7 +439,7 @@ mp_err mp_exptmod_i(const mp_int * montBase, SQR(pa1,pa2); MUL(smallExp/32,pa2,pa1); SQR(pa1,pa2); SQR(pa2,pa1); SQR(pa1,pa2); SQR(pa2,pa1); } else { - ABORT; + abort(); } } else if (window_bits == 6) { if (!smallExp) { @@ -471,10 +465,10 @@ mp_err mp_exptmod_i(const mp_int * montBase, SQR(pa1,pa2); MUL(smallExp/64,pa2,pa1); SQR(pa1,pa2); SQR(pa2,pa1); SQR(pa1,pa2); SQR(pa2,pa1); SQR(pa1,pa2); SWAPPA; } else { - ABORT; + abort(); } } else { - ABORT; + abort(); } } @@ -1013,7 +1007,7 @@ mp_err mp_exptmod_safe_i(const mp_int * montBase, } else if (smallExp & 1) { SQR(pa1,pa2); MUL_NOWEAVE(montBase,pa2,pa1); } else { - ABORT; + abort(); } break; case 6: @@ -1028,7 +1022,7 @@ mp_err mp_exptmod_safe_i(const mp_int * montBase, SQR(pa1,pa2); MUL(smallExp,pa2,pa1); break; default: - ABORT; /* could do a loop? */ + abort(); /* could do a loop? */ } } diff --git a/mozilla/security/nss/lib/freebl/win_rand.c b/mozilla/security/nss/lib/freebl/win_rand.c index 19175e6c0df..b0db4ef2d60 100644 --- a/mozilla/security/nss/lib/freebl/win_rand.c +++ b/mozilla/security/nss/lib/freebl/win_rand.c @@ -9,15 +9,10 @@ #include #include /* for CSIDL constants */ -#if defined(_WIN32_WCE) -#include /* Win CE puts lots of stuff here. */ -#include "prprf.h" /* for PR_snprintf */ -#else #include #include #include #include -#endif #include #include "prio.h" #include "prerror.h" @@ -81,17 +76,9 @@ size_t RNG_GetNoise(void *buf, size_t maxbuf) return n; { -#if defined(_WIN32_WCE) - // get the number of milliseconds elapsed since Windows CE was started. - FILETIME sTime; - SYSTEMTIME st; - GetSystemTime(&st); - SystemTimeToFileTime(&st,&sTime); -#else time_t sTime; // get the time in seconds since midnight Jan 1, 1970 time(&sTime); -#endif nBytes = sizeof(sTime) > maxbuf ? maxbuf : sizeof(sTime); memcpy(((char *)buf) + n, &sTime, nBytes); n += nBytes; @@ -154,10 +141,8 @@ EnumSystemFiles(Handler func) static const int folders[] = { CSIDL_BITBUCKET, CSIDL_RECENT, -#ifndef WINCE CSIDL_INTERNET_CACHE, CSIDL_HISTORY, -#endif 0 }; int i = 0; @@ -271,13 +256,11 @@ void RNG_SystemInfoForRNG(void) int nBytes; MEMORYSTATUS sMem; HANDLE hVal; -#if !defined(_WIN32_WCE) DWORD dwSerialNum; DWORD dwComponentLen; DWORD dwSysFlags; char volName[128]; DWORD dwSectors, dwBytes, dwFreeClusters, dwNumClusters; -#endif nBytes = RNG_GetNoise(buffer, 20); // get up to 20 bytes RNG_RandomUpdate(buffer, nBytes); @@ -285,16 +268,12 @@ void RNG_SystemInfoForRNG(void) sMem.dwLength = sizeof(sMem); GlobalMemoryStatus(&sMem); // assorted memory stats RNG_RandomUpdate(&sMem, sizeof(sMem)); -#if !defined(_WIN32_WCE) dwVal = GetLogicalDrives(); RNG_RandomUpdate(&dwVal, sizeof(dwVal)); // bitfields in bits 0-25 -#endif -#if !defined(_WIN32_WCE) dwVal = sizeof(buffer); if (GetComputerName(buffer, &dwVal)) RNG_RandomUpdate(buffer, dwVal); -#endif hVal = GetCurrentProcess(); // 4 or 8 byte pseudo handle (a // constant!) of current process @@ -306,7 +285,6 @@ void RNG_SystemInfoForRNG(void) dwVal = GetCurrentThreadId(); // thread ID (4 bytes) RNG_RandomUpdate(&dwVal, sizeof(dwVal)); -#if !defined(_WIN32_WCE) volName[0] = '\0'; buffer[0] = '\0'; GetVolumeInformation(NULL, @@ -331,7 +309,6 @@ void RNG_SystemInfoForRNG(void) RNG_RandomUpdate(&dwFreeClusters, sizeof(dwFreeClusters)); RNG_RandomUpdate(&dwNumClusters, sizeof(dwNumClusters)); } -#endif // Skip the potentially slow file scanning if the OS's PRNG worked. if (!usedWindowsPRNG) @@ -352,63 +329,6 @@ static void rng_systemJitter(void) } -#if defined(_WIN32_WCE) -void RNG_FileForRNG(const char *filename) -{ - PRFileDesc * file; - int nBytes; - PRFileInfo infoBuf; - unsigned char buffer[1024]; - - if (PR_GetFileInfo(filename, &infoBuf) != PR_SUCCESS) - return; - - RNG_RandomUpdate((unsigned char*)&infoBuf, sizeof(infoBuf)); - - file = PR_Open(filename, PR_RDONLY, 0); - if (file != NULL) { - for (;;) { - PRInt32 bytes = PR_Read(file, buffer, sizeof buffer); - - if (bytes <= 0) - break; - - RNG_RandomUpdate(buffer, bytes); - totalFileBytes += bytes; - if (totalFileBytes > maxFileBytes) - break; - } - - PR_Close(file); - } - - nBytes = RNG_GetNoise(buffer, 20); // get up to 20 bytes - RNG_RandomUpdate(buffer, nBytes); -} - -/* - * The Windows CE and Windows Mobile FIPS Security Policy, page 13, - * (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp825.pdf) - * says CeGenRandom is the right function to call for creating a seed - * for a random number generator. - */ -size_t RNG_SystemRNG(void *dest, size_t maxLen) -{ - size_t bytes = 0; - usedWindowsPRNG = PR_FALSE; - if (CeGenRandom(maxLen, dest)) { - bytes = maxLen; - usedWindowsPRNG = PR_TRUE; - } - if (bytes == 0) { - bytes = rng_systemFromNoise(dest,maxLen); - } - return bytes; -} - - -#else /* not WinCE */ - void RNG_FileForRNG(const char *filename) { FILE* file; @@ -542,6 +462,4 @@ done: FreeLibrary(hModule); return bytes; } -#endif /* not WinCE */ - #endif /* is XP_WIN */ diff --git a/mozilla/security/nss/lib/softoken/config.mk b/mozilla/security/nss/lib/softoken/config.mk index 9bed4c2b9b1..908d1d97eb7 100644 --- a/mozilla/security/nss/lib/softoken/config.mk +++ b/mozilla/security/nss/lib/softoken/config.mk @@ -65,7 +65,3 @@ endif ifeq ($(OS_TARGET),SunOS) OS_LIBS += -lbsm endif - -ifeq ($(OS_TARGET),WINCE) -DEFINES += -DDBM_USING_NSPR -endif diff --git a/mozilla/security/nss/lib/softoken/legacydb/config.mk b/mozilla/security/nss/lib/softoken/legacydb/config.mk index 4eda831df42..4835ae2ed3c 100644 --- a/mozilla/security/nss/lib/softoken/legacydb/config.mk +++ b/mozilla/security/nss/lib/softoken/legacydb/config.mk @@ -59,7 +59,3 @@ endif ifeq ($(OS_TARGET),SunOS) OS_LIBS += -lbsm endif - -ifeq ($(OS_TARGET),WINCE) -DEFINES += -DDBM_USING_NSPR -endif diff --git a/mozilla/security/nss/lib/softoken/sdb.c b/mozilla/security/nss/lib/softoken/sdb.c index 66c155ac7e7..c6ff11037c8 100644 --- a/mozilla/security/nss/lib/softoken/sdb.c +++ b/mozilla/security/nss/lib/softoken/sdb.c @@ -1684,9 +1684,7 @@ sdb_init(char *dbname, char *table, sdbDataType type, int *inUpdate, * a database */ if (create) { /* NO NSPR call for this? :( */ -#ifndef WINCE chmod (dbname, 0600); -#endif } if (flags != SDB_RDONLY) { diff --git a/mozilla/security/nss/lib/ssl/sslimpl.h b/mozilla/security/nss/lib/ssl/sslimpl.h index e6229149a9a..b1e27efa02a 100644 --- a/mozilla/security/nss/lib/ssl/sslimpl.h +++ b/mozilla/security/nss/lib/ssl/sslimpl.h @@ -5,7 +5,7 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id: sslimpl.h,v 1.108 2012-09-28 01:46:45 wtc%google.com Exp $ */ +/* $Id: sslimpl.h,v 1.109 2012-11-14 01:14:12 wtc%google.com Exp $ */ #ifndef __sslimpl_h_ #define __sslimpl_h_ @@ -1791,8 +1791,6 @@ SEC_END_PROTOS #if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS) #define SSL_GETPID getpid -#elif defined(_WIN32_WCE) -#define SSL_GETPID GetCurrentProcessId #elif defined(WIN32) extern int __cdecl _getpid(void); #define SSL_GETPID _getpid diff --git a/mozilla/security/nss/lib/ssl/sslnonce.c b/mozilla/security/nss/lib/ssl/sslnonce.c index 9be9714f9ee..43d58c10c90 100644 --- a/mozilla/security/nss/lib/ssl/sslnonce.c +++ b/mozilla/security/nss/lib/ssl/sslnonce.c @@ -4,7 +4,7 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id: sslnonce.c,v 1.27 2012-04-25 14:50:12 gerv%gerv.net Exp $ */ +/* $Id: sslnonce.c,v 1.28 2012-11-14 01:14:12 wtc%google.com Exp $ */ #include "cert.h" #include "pk11pub.h" @@ -15,7 +15,7 @@ #include "sslimpl.h" #include "sslproto.h" #include "nssilock.h" -#if (defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS)) && !defined(_WIN32_WCE) +#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS) #include #endif @@ -452,7 +452,7 @@ PRUint32 ssl_Time(void) { PRUint32 myTime; -#if (defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS)) && !defined(_WIN32_WCE) +#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS) myTime = time(NULL); /* accurate until the year 2038. */ #else /* portable, but possibly slower */ diff --git a/mozilla/security/nss/lib/ssl/sslsock.c b/mozilla/security/nss/lib/ssl/sslsock.c index 7b915f0a4db..604139008b6 100644 --- a/mozilla/security/nss/lib/ssl/sslsock.c +++ b/mozilla/security/nss/lib/ssl/sslsock.c @@ -6,7 +6,7 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id: sslsock.c,v 1.97 2012-11-10 12:17:44 wtc%google.com Exp $ */ +/* $Id: sslsock.c,v 1.98 2012-11-14 01:14:12 wtc%google.com Exp $ */ #include "seccomon.h" #include "cert.h" #include "keyhi.h" @@ -2753,7 +2753,7 @@ loser: return SECFailure; } -#if (defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS)) && !defined(_WIN32_WCE) +#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS) #define NSS_HAVE_GETENV 1 #endif diff --git a/mozilla/security/nss/lib/util/secder.h b/mozilla/security/nss/lib/util/secder.h index bada1c647de..b23f7d6f3cf 100644 --- a/mozilla/security/nss/lib/util/secder.h +++ b/mozilla/security/nss/lib/util/secder.h @@ -11,13 +11,10 @@ * secder.h - public data structures and prototypes for the DER encoding and * decoding utilities library * - * $Id: secder.h,v 1.16 2012-04-25 14:50:16 gerv%gerv.net Exp $ + * $Id: secder.h,v 1.17 2012-11-14 01:14:12 wtc%google.com Exp $ */ -#if defined(_WIN32_WCE) -#else #include -#endif #include "plarena.h" #include "prlong.h" diff --git a/mozilla/security/nss/lib/util/secport.c b/mozilla/security/nss/lib/util/secport.c index cbf6b7db038..81f469dc304 100644 --- a/mozilla/security/nss/lib/util/secport.c +++ b/mozilla/security/nss/lib/util/secport.c @@ -9,7 +9,7 @@ * * NOTE - These are not public interfaces * - * $Id: secport.c,v 1.30 2012-04-25 14:50:16 gerv%gerv.net Exp $ + * $Id: secport.c,v 1.31 2012-11-14 01:14:12 wtc%google.com Exp $ */ #include "seccomon.h" @@ -633,9 +633,6 @@ PORT_UCS2_ASCIIConversion(PRBool toUnicode, unsigned char *inBuf, int NSS_PutEnv(const char * envVarName, const char * envValue) { -#ifdef _WIN32_WCE - return SECFailure; -#else SECStatus result = SECSuccess; char * encoded; int putEnvFailed; @@ -661,7 +658,6 @@ NSS_PutEnv(const char * envVarName, const char * envValue) PORT_Free(encoded); } return result; -#endif } /* diff --git a/mozilla/security/nss/lib/util/secport.h b/mozilla/security/nss/lib/util/secport.h index 155a6955f07..6434037c1c3 100644 --- a/mozilla/security/nss/lib/util/secport.h +++ b/mozilla/security/nss/lib/util/secport.h @@ -5,7 +5,7 @@ /* * secport.h - portability interfaces for security libraries * - * $Id: secport.h,v 1.28 2012-04-25 14:50:16 gerv%gerv.net Exp $ + * $Id: secport.h,v 1.29 2012-11-14 01:14:12 wtc%google.com Exp $ */ #ifndef _SECPORT_H_ @@ -41,20 +41,11 @@ # endif #endif -#if defined(_WIN32_WCE) -#include -#include -#else #include -#endif #include #include -#if defined(_WIN32_WCE) -#include /* WinCE puts some stddef symbols here. */ -#else #include -#endif #include #include "prtypes.h" #include "prlog.h" /* for PR_ASSERT */ diff --git a/mozilla/security/nss/lib/util/utilmod.c b/mozilla/security/nss/lib/util/utilmod.c index 265cb3832b4..daf061fce0b 100644 --- a/mozilla/security/nss/lib/util/utilmod.c +++ b/mozilla/security/nss/lib/util/utilmod.c @@ -137,7 +137,6 @@ static SECStatus nssutil_AddSecmodDB(NSSDBType dbType, const char *appName, #endif #include -#ifndef WINCE /* same as fopen, except it doesn't use umask, but explicit */ FILE * lfopen(const char *name, const char *mode, int flags) @@ -156,7 +155,6 @@ lfopen(const char *name, const char *mode, int flags) /* file inherits fd */ return file; } -#endif #define MAX_LINE_LENGTH 2048 @@ -466,11 +464,7 @@ nssutil_DeleteSecmodDB(NSSDBType dbType, const char *appName, /* do we really want to use streams here */ fd = fopen(dbname, "r"); if (fd == NULL) goto loser; -#ifdef WINCE - fd2 = fopen(dbname2, "w+"); -#else fd2 = lfopen(dbname2, "w+", O_CREAT|O_RDWR|O_TRUNC); -#endif if (fd2 == NULL) goto loser; name = NSSUTIL_ArgGetParamValue("name",args); @@ -589,11 +583,7 @@ nssutil_AddSecmodDB(NSSDBType dbType, const char *appName, (void) nssutil_DeleteSecmodDB(dbType, appName, filename, dbname, module, rw); -#ifdef WINCE - fd = fopen(dbname, "a+"); -#else fd = lfopen(dbname, "a+", O_CREAT|O_RDWR|O_APPEND); -#endif if (fd == NULL) { return SECFailure; }