Skip to content

Commit

Permalink
Bug 654611: Remove WinCE code from NSS. The patch is contributed by
Browse files Browse the repository at this point in the history
Ed Morley <bmo@edmorley.co.uk>. r=wtc.
Modified Files:
	mozilla/dbm/include/mcom_db.h mozilla/dbm/include/winfile.h
	mozilla/dbm/src/Makefile.in mozilla/dbm/src/mktemp.c
	mozilla/security/coreconf/Linux.mk
	mozilla/security/coreconf/WIN95.mk
	mozilla/security/coreconf/WINNT.mk
	mozilla/security/coreconf/config.mk
	mozilla/security/coreconf/rules.mk
	mozilla/security/nss/Makefile
	mozilla/security/nss/cmd/platlibs.mk
	mozilla/security/nss/cmd/certutil/keystuff.c
	mozilla/security/nss/cmd/lib/basicutil.c
	mozilla/security/nss/cmd/lib/config.mk
	mozilla/security/nss/cmd/lib/secpwd.c
	mozilla/security/nss/cmd/lib/secutil.c
	mozilla/security/nss/cmd/strsclnt/strsclnt.c
	mozilla/security/nss/lib/certhigh/ocsp.c
	mozilla/security/nss/lib/ckfw/Makefile
	mozilla/security/nss/lib/freebl/Makefile
	mozilla/security/nss/lib/freebl/arcfour.c
	mozilla/security/nss/lib/freebl/config.mk
	mozilla/security/nss/lib/freebl/win_rand.c
	mozilla/security/nss/lib/freebl/mpi/mpi.h
	mozilla/security/nss/lib/freebl/mpi/mpmontg.c
	mozilla/security/nss/lib/softoken/config.mk
	mozilla/security/nss/lib/softoken/sdb.c
	mozilla/security/nss/lib/softoken/legacydb/config.mk
	mozilla/security/nss/lib/ssl/sslimpl.h
	mozilla/security/nss/lib/ssl/sslnonce.c
	mozilla/security/nss/lib/ssl/sslsock.c
	mozilla/security/nss/lib/util/secder.h
	mozilla/security/nss/lib/util/secport.c
	mozilla/security/nss/lib/util/secport.h
	mozilla/security/nss/lib/util/utilmod.c
Removed Files:
	mozilla/security/coreconf/WINCE.mk
	mozilla/security/nss/cmd/lib/wincemain.c
  • Loading branch information
wtc%google.com committed Nov 14, 2012
1 parent 90e21f9 commit 0c7a8d1
Show file tree
Hide file tree
Showing 37 changed files with 31 additions and 430 deletions.
4 changes: 0 additions & 4 deletions dbm/include/mcom_db.h
Expand Up @@ -36,10 +36,6 @@
#define _DB_H_


#ifdef WINCE
#define off_t long
#endif

#ifndef macintosh
#include <sys/types.h>
#endif
Expand Down
5 changes: 0 additions & 5 deletions dbm/include/winfile.h
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions dbm/src/Makefile.in
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions dbm/src/mktemp.c
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion security/coreconf/Linux.mk
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion security/coreconf/WIN95.mk
Expand Up @@ -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)
182 changes: 0 additions & 182 deletions security/coreconf/WINCE.mk

This file was deleted.

2 changes: 1 addition & 1 deletion security/coreconf/WINNT.mk
Expand Up @@ -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
2 changes: 1 addition & 1 deletion security/coreconf/config.mk
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions security/coreconf/rules.mk
Expand Up @@ -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; \
Expand Down Expand Up @@ -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; \
Expand Down
4 changes: 1 addition & 3 deletions security/nss/Makefile
Expand Up @@ -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) #
Expand Down
4 changes: 1 addition & 3 deletions security/nss/cmd/certutil/keystuff.c
Expand Up @@ -14,10 +14,8 @@

#if defined(XP_WIN) || defined (XP_PC)
#include <time.h>
#ifndef WINCE
#include <conio.h>
#endif
#endif

#if defined(__sun) && !defined(SVR4)
extern int fclose(FILE*);
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 0 additions & 6 deletions security/nss/cmd/lib/basicutil.c
Expand Up @@ -17,10 +17,8 @@

#include "basicutil.h"
#include <stdarg.h>
#if !defined(_WIN32_WCE)
#include <sys/stat.h>
#include <errno.h>
#endif

#ifdef XP_UNIX
#include <unistd.h>
Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 0 additions & 4 deletions security/nss/cmd/lib/config.mk
Expand Up @@ -13,7 +13,3 @@ SHARED_LIBRARY =
IMPORT_LIBRARY =
PROGRAM =

ifeq (WINCE,$(OS_ARCH))
CSRCS += wincemain.c
endif

7 changes: 2 additions & 5 deletions security/nss/cmd/lib/secpwd.c
Expand Up @@ -20,7 +20,7 @@
#include <unistd.h> /* for isatty() */
#endif

#if( defined(_WINDOWS) && !defined(_WIN32_WCE))
#if defined(_WINDOWS)
#include <conio.h>
#include <io.h>
#define QUIET_FGETS quiet_fgets
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions security/nss/cmd/lib/secutil.c
Expand Up @@ -20,10 +20,8 @@
#include "secpkcs7.h"
#include "secpkcs5.h"
#include <stdarg.h>
#if !defined(_WIN32_WCE)
#include <sys/stat.h>
#include <errno.h>
#endif

#ifdef XP_UNIX
#include <unistd.h>
Expand Down

0 comments on commit 0c7a8d1

Please sign in to comment.