diff options
author | Ludovic Hirlimann <ludovic@mozilla.com> | 2019-06-29 00:05:59 +0200 |
---|---|---|
committer | Ludovic Hirlimann <ludovic@mozilla.com> | 2019-06-29 00:05:59 +0200 |
commit | 97aebea7a0b68f54eabd05b90649696ec64495f4 (patch) | |
tree | 461e5b5ce39d88e577b79626aefbdc8077882922 | |
parent | aace8a10ff70178ef8923fb351362cd37fa1fb10 (diff) | |
download | nspr-hg-97aebea7a0b68f54eabd05b90649696ec64495f4.tar.gz |
Bug 1535665 - Remove support for Symbian. r=kaie
48 files changed, 34 insertions, 840 deletions
diff --git a/config/Makefile.in b/config/Makefile.in index c8695e93..7c6c815d 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -65,7 +65,7 @@ PROGS = $(OBJDIR)/now$(PROG_SUFFIX) ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH))) TARGETS = $(PROGS) else -ifeq (,$(filter-out SYMBIAN WINCE,$(OS_ARCH))) +ifeq (,$(filter-out WINCE,$(OS_ARCH))) TARGETS = $(PROGS) else PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 8c9a43aa..08a1024a 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -140,7 +140,6 @@ endif MACOS_SDK_DIR = @MACOS_SDK_DIR@ -SYMBIAN_SDK_DIR = @SYMBIAN_SDK_DIR@ NEXT_ROOT = @NEXT_ROOT@ ifdef NEXT_ROOT @@ -623,7 +623,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS MT NEXT_ROOT -SYMBIAN_SDK_DIR MACOS_SDK_DIR WRAP_SYSTEM_INCLUDES VISIBILITY_FLAGS @@ -792,7 +791,6 @@ enable_optimize enable_debug enable_debug_symbols enable_win32_target -enable_symbian_target enable_debug_rtl enable_static_rtl enable_n32 @@ -811,7 +809,6 @@ with_arch with_fpu with_float_abi with_soft_float -with_symbian_sdk with_ccache enable_strip with_pthreads @@ -1453,8 +1450,6 @@ Optional Features: (using compiler flags DBG) --enable-win32-target=\$t Specify win32 flavor. (WIN95 or WINNT) - --enable-symbian-target=\$t - Specify symbian flavor. (WINSCW or GCCE) --enable-debug-rtl Use the MSVC debug runtime library --enable-static-rtl Use the MSVC static runtime library --enable-x32 Enable x32 ABI support (x86_64 only) @@ -1505,8 +1500,6 @@ Optional Packages: Use specific arm float ABI (-mfloat-abi=type) --with-soft-float[=yes|no|toolchain-default] Use soft float library (-msoft-float) - --with-symbian-sdk=SYMBIAN_SDK_DIR - The path to the Symbian SDK --with-ccache=path/to/ccache Enable compiling with ccache --with-pthreads Use system pthreads library as thread subsystem @@ -2860,11 +2853,6 @@ if test "${enable_win32_target+set}" = set; then : fi -# Check whether --enable-symbian-target was given. -if test "${enable_symbian_target+set}" = set; then : - enableval=$enable_symbian_target; OS_TARGET=`echo $enableval | tr a-z A-Z` -fi - # Check whether --enable-debug-rtl was given. if test "${enable_debug_rtl+set}" = set; then : @@ -7478,94 +7466,6 @@ $as_echo "$as_me: WARNING: Unknown version of the Microsoft (R) Manifest Tool." CPU_ARCH=x86 ;; -*-symbian*) - -# Check whether --with-symbian-sdk was given. -if test "${with_symbian_sdk+set}" = set; then : - withval=$with_symbian_sdk; SYMBIAN_SDK_DIR=$withval -fi - - - echo ----------------------------------------------------------------------------- - echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR - echo ----------------------------------------------------------------------------- - - $as_echo "#define XP_UNIX 1" >>confdefs.h - - $as_echo "#define SYMBIAN 1" >>confdefs.h - - $as_echo "#define __arm__ 1" >>confdefs.h - - $as_echo "#define __SYMBIAN32__ 1" >>confdefs.h - - $as_echo "#define _UNICODE 1" >>confdefs.h - - $as_echo "#define NDEBUG 1" >>confdefs.h - - $as_echo "#define __SUPPORT_CPP_EXCEPTIONS__ 1" >>confdefs.h - - $as_echo "#define MOZ_STDERR_TO_STDOUT 1" >>confdefs.h - - $as_echo "#define HAVE_FCNTL_FILE_LOCKING 1" >>confdefs.h - - $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h - - USE_PTHREADS=1 - LIB_SUFFIX=lib - DLL_SUFFIX=dll - MKSHLIB= - DSO_LDOPTS= - DSO_CFLAGS= - VISIBILITY_FLAGS= - MDCPUCFG_H=_symbian.cfg - PR_MD_CSRCS=symbian.c - NSINSTALL=nsinstall - RANLIB='echo no ranlib ' - CPU_ARCH=ARM - OS_ARCH=SYMBIAN - OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__" - CFLAGS="$CFLAGS -MD -nostdinc" - SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis" - echo ------------------------------------------------------- - echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE - echo ------------------------------------------------------- - case "$OS_TARGET" in - WINSCW) - CC=mwccsym2.exe - CXX=mwccsym2.exe - LD=mwldsym2.exe - AR=mwldsym2.exe - WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB" - CFLAGS="$CFLAGS -O0 -inline off -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -nostderr -gccdep -cwd source -i- -I\$(VPATH)" - SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh" - AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@" - $as_echo "#define _DEBUG 1" >>confdefs.h - - $as_echo "#define __CW32__ 1" >>confdefs.h - - $as_echo "#define __WINS__ 1" >>confdefs.h - - $as_echo "#define __WINSCW__ 1" >>confdefs.h - - DEFINES="$DEFINES -U_WIN32" - ;; - GCCE) - CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float" - CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy" - SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h" - $as_echo "#define __GCCE__ 1" >>confdefs.h - - $as_echo "#define __EABI__ 1" >>confdefs.h - - DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh" - ;; - *) - as_fn_error $? "Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." "$LINENO" 5 - ;; - esac - CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}" - ;; - *-os2*) $as_echo "#define XP_OS2 1" >>confdefs.h diff --git a/configure.in b/configure.in index e6a1a0f4..c4169843 100644 --- a/configure.in +++ b/configure.in @@ -339,10 +339,6 @@ AC_ARG_ENABLE(win32-target, Specify win32 flavor. (WIN95 or WINNT)], OS_TARGET=`echo $enableval | tr a-z A-Z`) -AC_ARG_ENABLE(symbian-target, - [ --enable-symbian-target=\$t - Specify symbian flavor. (WINSCW or GCCE)], - OS_TARGET=`echo $enableval | tr a-z A-Z`) AC_ARG_ENABLE(debug-rtl, [ --enable-debug-rtl Use the MSVC debug runtime library], @@ -2243,76 +2239,6 @@ tools are selected during the Xcode/Developer Tools installation.]) CPU_ARCH=x86 ;; -*-symbian*) - AC_ARG_WITH(symbian-sdk, - [ --with-symbian-sdk=SYMBIAN_SDK_DIR - The path to the Symbian SDK], - SYMBIAN_SDK_DIR=$withval) - - echo ----------------------------------------------------------------------------- - echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR - echo ----------------------------------------------------------------------------- - - AC_DEFINE(XP_UNIX) - AC_DEFINE(SYMBIAN) - AC_DEFINE(__arm__) - AC_DEFINE(__SYMBIAN32__) - AC_DEFINE(_UNICODE) - AC_DEFINE(NDEBUG) - AC_DEFINE(__SUPPORT_CPP_EXCEPTIONS__) - AC_DEFINE(MOZ_STDERR_TO_STDOUT) - AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) - AC_DEFINE(HAVE_SOCKLEN_T) - USE_PTHREADS=1 - LIB_SUFFIX=lib - DLL_SUFFIX=dll - MKSHLIB= - DSO_LDOPTS= - DSO_CFLAGS= - VISIBILITY_FLAGS= - MDCPUCFG_H=_symbian.cfg - PR_MD_CSRCS=symbian.c - NSINSTALL=nsinstall - RANLIB='echo no ranlib ' - CPU_ARCH=ARM - OS_ARCH=SYMBIAN - OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__" - CFLAGS="$CFLAGS -MD -nostdinc" - SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis" - echo ------------------------------------------------------- - echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE - echo ------------------------------------------------------- - case "$OS_TARGET" in - WINSCW) - CC=mwccsym2.exe - CXX=mwccsym2.exe - LD=mwldsym2.exe - AR=mwldsym2.exe - WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB" - CFLAGS="$CFLAGS -O0 -inline off -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -nostderr -gccdep -cwd source -i- -I\$(VPATH)" - SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh" - AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@" - AC_DEFINE(_DEBUG) - AC_DEFINE(__CW32__) - AC_DEFINE(__WINS__) - AC_DEFINE(__WINSCW__) - DEFINES="$DEFINES -U_WIN32" - ;; - GCCE) - CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float" - CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy" - SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h" - AC_DEFINE(__GCCE__) - AC_DEFINE(__EABI__) - DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh" - ;; - *) - AC_MSG_ERROR([Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'.]) - ;; - esac - CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}" - ;; - *-os2*) AC_DEFINE(XP_OS2) AC_DEFINE(XP_PC) @@ -2926,7 +2852,6 @@ AC_SUBST(CYGWIN_WRAPPER) AC_SUBST(VISIBILITY_FLAGS) AC_SUBST(WRAP_SYSTEM_INCLUDES) AC_SUBST(MACOS_SDK_DIR) -AC_SUBST(SYMBIAN_SDK_DIR) AC_SUBST(NEXT_ROOT) AC_SUBST(MT) diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h index 4890966f..7e08d148 100644 --- a/pr/include/md/_pth.h +++ b/pr/include/md/_pth.h @@ -89,7 +89,7 @@ || defined(HPUX) || defined(FREEBSD) \ || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \ || defined(NTO) || defined(DARWIN) \ - || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) + || defined(UNIXWARE) || defined(RISCOS) #define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) (t) = 0 #define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) (t) == 0 #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) @@ -116,7 +116,7 @@ || defined(LINUX) || defined(__GNU__)|| defined(__GLIBC__) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ || defined(BSDI) || defined(UNIXWARE) \ - || defined(DARWIN) || defined(SYMBIAN) + || defined(DARWIN) #define PT_NO_SIGTIMEDWAIT #endif @@ -133,7 +133,7 @@ #define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER) #define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) #elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ - || defined(FREEBSD) || defined(SYMBIAN) + || defined(FREEBSD) #define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER) #define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) #elif defined(NTO) @@ -177,7 +177,7 @@ extern int (*_PT_aix_yield_fcn)(); || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ || defined(BSDI) || defined(NTO) || defined(DARWIN) \ - || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) + || defined(UNIXWARE) || defined(RISCOS) #define _PT_PTHREAD_YIELD() sched_yield() #else #error "Need to define _PT_PTHREAD_YIELD for this platform" diff --git a/pr/include/md/_symbian.cfg b/pr/include/md/_symbian.cfg deleted file mode 100644 index 4d497973..00000000 --- a/pr/include/md/_symbian.cfg +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* 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/. */ - -#ifndef nspr_cpucfg___ -#define nspr_cpucfg___ - -#ifndef XP_UNIX -#define XP_UNIX -#endif - -#ifndef SYMBIAN -#define SYMBIAN -#endif - -#define PR_AF_INET6 0x0806 /* same as AF_INET6 */ - -#ifdef __arm__ - -#define IS_LITTLE_ENDIAN 1 -#undef IS_BIG_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_FLOAT 4 -#define PR_ALIGN_OF_POINTER 4 -#define PR_ALIGN_OF_WORD 4 -#define PR_ALIGN_OF_INT64 8 -#define PR_ALIGN_OF_DOUBLE 8 - -#define PR_BYTES_PER_WORD_LOG2 2 -#define PR_BYTES_PER_DWORD_LOG2 3 - -#elif defined(__WINS__) - -#define IS_LITTLE_ENDIAN 1 -#undef IS_BIG_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_FLOAT 4 -#define PR_ALIGN_OF_POINTER 4 -#define PR_ALIGN_OF_WORD 4 -#define PR_ALIGN_OF_INT64 4 -#define PR_ALIGN_OF_DOUBLE 4 - -#define PR_BYTES_PER_WORD_LOG2 2 -#define PR_BYTES_PER_DWORD_LOG2 3 - -#else - -#error "Unknown CPU architecture" - -#endif - -#ifndef HAVE_LONG_LONG -#define HAVE_LONG_LONG -#endif -#if PR_ALIGN_OF_DOUBLE == 8 -#define HAVE_ALIGNED_DOUBLES -#endif -#if PR_ALIGN_OF_INT64 == 8 -#define HAVE_ALIGNED_LONGLONGS -#endif - -#ifndef NO_NSPR_10_SUPPORT - -#define BYTES_PER_BYTE PR_BYTES_PER_BYTE -#define BYTES_PER_SHORT PR_BYTES_PER_SHORT -#define BYTES_PER_INT PR_BYTES_PER_INT -#define BYTES_PER_INT64 PR_BYTES_PER_INT64 -#define BYTES_PER_LONG PR_BYTES_PER_LONG -#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT -#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE -#define BYTES_PER_WORD PR_BYTES_PER_WORD -#define BYTES_PER_DWORD PR_BYTES_PER_DWORD - -#define BITS_PER_BYTE PR_BITS_PER_BYTE -#define BITS_PER_SHORT PR_BITS_PER_SHORT -#define BITS_PER_INT PR_BITS_PER_INT -#define BITS_PER_INT64 PR_BITS_PER_INT64 -#define BITS_PER_LONG PR_BITS_PER_LONG -#define BITS_PER_FLOAT PR_BITS_PER_FLOAT -#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE -#define BITS_PER_WORD PR_BITS_PER_WORD - -#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 -#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 -#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 -#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 -#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 -#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 -#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 -#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 - -#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT -#define ALIGN_OF_INT PR_ALIGN_OF_INT -#define ALIGN_OF_LONG PR_ALIGN_OF_LONG -#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 -#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT -#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE -#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER -#define ALIGN_OF_WORD PR_ALIGN_OF_WORD - -#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 -#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 -#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 - -#endif /* NO_NSPR_10_SUPPORT */ - -#endif /* nspr_cpucfg___ */ diff --git a/pr/include/md/_symbian.h b/pr/include/md/_symbian.h deleted file mode 100644 index f88bd385..00000000 --- a/pr/include/md/_symbian.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* 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/. */ - -#ifndef nspr_symbian_defs_h___ -#define nspr_symbian_defs_h___ - -#include "prthread.h" - -/* - * Internal configuration macros - */ - -#define _PR_SI_SYSNAME "SYMBIAN" -#if defined(__WINS__) -#define _PR_SI_ARCHITECTURE "i386" -#elif defined(__arm__) -#define _PR_SI_ARCHITECTURE "arm" -#else -#error "Unknown CPU architecture" -#endif -#define PR_DLL_SUFFIX ".dll" - -#undef HAVE_STACK_GROWING_UP - -#ifdef DYNAMIC_LIBRARY -#define HAVE_DLL -#define USE_DLFCN -#endif - -#define _PR_STAT_HAS_ONLY_ST_ATIME -#define _PR_NO_LARGE_FILES -#define _PR_HAVE_SYSV_SEMAPHORES -#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY - -#ifndef _PR_PTHREADS -#error "Classic NSPR is not implemented" -#endif - -extern void _MD_EarlyInit(void); - -#define _MD_EARLY_INIT _MD_EarlyInit -#define _MD_FINAL_INIT _PR_UnixInit -#define _MD_INTERVAL_USE_GTOD - -/* For writev() */ -#include <sys/uio.h> - -#endif /* nspr_symbian_defs_h___ */ diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h index 96b81859..4f9dea43 100644 --- a/pr/include/md/_unixos.h +++ b/pr/include/md/_unixos.h @@ -46,13 +46,11 @@ */ #include <sys/time.h> #include <sys/types.h> -#if defined(AIX) || defined(SYMBIAN) +#if defined(AIX) #include <sys/select.h> #endif -#ifndef SYMBIAN #define HAVE_NETINET_TCP_H -#endif #define _PR_HAVE_O_APPEND diff --git a/pr/include/md/prosdep.h b/pr/include/md/prosdep.h index b47e101e..7fdd0ff8 100644 --- a/pr/include/md/prosdep.h +++ b/pr/include/md/prosdep.h @@ -73,9 +73,6 @@ PR_BEGIN_EXTERN_C #elif defined(RISCOS) #include "md/_riscos.h" -#elif defined(SYMBIAN) -#include "md/_symbian.h" - #else #error unknown Unix flavor diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h index 94bca3cf..dd8a2b22 100644 --- a/pr/include/prtypes.h +++ b/pr/include/prtypes.h @@ -96,27 +96,6 @@ #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x -#elif defined(SYMBIAN) - -#define PR_EXPORT(__type) extern __declspec(dllexport) __type -#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type -#ifdef __WINS__ -#define PR_IMPORT(__type) extern __declspec(dllexport) __type -#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type -#else -#define PR_IMPORT(__type) extern __declspec(dllimport) __type -#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type -#endif - -#define PR_EXTERN(__type) extern __type -#define PR_IMPLEMENT(__type) __type -#define PR_EXTERN_DATA(__type) extern __type -#define PR_IMPLEMENT_DATA(__type) __type - -#define PR_CALLBACK -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x - #else /* Unix */ /* GCC 3.3 and later support the visibility attribute. */ diff --git a/pr/src/md/prosdep.c b/pr/src/md/prosdep.c index 137ffaec..aa4bdb0d 100644 --- a/pr/src/md/prosdep.c +++ b/pr/src/md/prosdep.c @@ -31,7 +31,7 @@ static void GetPageSize(void) #if defined BSDI || defined AIX \ || defined LINUX || defined __GNU__ || defined __GLIBC__ \ || defined FREEBSD || defined NETBSD || defined OPENBSD \ - || defined DARWIN || defined SYMBIAN + || defined DARWIN _pr_pageSize = getpagesize(); #elif defined(HPUX) /* I have no idea. Don't get me started. --Rob */ diff --git a/pr/src/md/unix/symbian.c b/pr/src/md/unix/symbian.c deleted file mode 100644 index c797d868..00000000 --- a/pr/src/md/unix/symbian.c +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* 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/. */ - -#include "primpl.h" - -void _MD_EarlyInit(void) -{ -} - -PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np) -{ - *np = 0; - return NULL; -} diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c index ceb67f07..0ae866a2 100644 --- a/pr/src/md/unix/unix.c +++ b/pr/src/md/unix/unix.c @@ -2527,11 +2527,7 @@ PRInt32 _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info) * initialized by _PR_MD_FINAL_INIT. This means the log file cannot be a * large file on some platforms. */ -#ifdef SYMBIAN -struct _MD_IOVector _md_iovector; /* Will crash if NSPR_LOG_FILE is set. */ -#else struct _MD_IOVector _md_iovector = { open }; -#endif /* ** These implementations are to emulate large file routines on systems that diff --git a/pr/src/md/unix/uxproces.c b/pr/src/md/unix/uxproces.c index 808b6c93..c4c5b8da 100644 --- a/pr/src/md/unix/uxproces.c +++ b/pr/src/md/unix/uxproces.c @@ -191,7 +191,7 @@ ForkAndExec( #ifdef AIX process->md.pid = (*pr_wp.forkptr)(); -#elif defined(NTO) || defined(SYMBIAN) +#elif defined(NTO) /* * fork() & exec() does not work in a multithreaded process. * Use spawn() instead. @@ -222,12 +222,7 @@ ForkAndExec( PR_ASSERT(attr->currentDirectory == NULL); /* not implemented */ } -#ifdef SYMBIAN - /* In Symbian OS, we use posix_spawn instead of fork() and exec() */ - posix_spawn(&(process->md.pid), path, NULL, NULL, argv, childEnvp); -#else process->md.pid = spawn(path, 3, fd_map, NULL, argv, childEnvp); -#endif if (fd_map[0] != 0) close(fd_map[0]); @@ -255,7 +250,7 @@ ForkAndExec( * the parent process's standard I/O data structures. */ -#if !defined(NTO) && !defined(SYMBIAN) +#if !defined(NTO) if (attr) { /* the osfd's to redirect stdin, stdout, and stderr to */ int in_osfd = -1, out_osfd = -1, err_osfd = -1; @@ -854,11 +849,6 @@ PRStatus _MD_KillUnixProcess(PRProcess *process) PRErrorCode prerror; PRInt32 oserror; -#ifdef SYMBIAN - /* In Symbian OS, we can not kill other process with Open C */ - PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, oserror); - return PR_FAILURE; -#else if (kill(process->md.pid, SIGKILL) == 0) { return PR_SUCCESS; } @@ -876,5 +866,4 @@ PRStatus _MD_KillUnixProcess(PRProcess *process) } PR_SetError(prerror, oserror); return PR_FAILURE; -#endif } /* _MD_KillUnixProcess */ diff --git a/pr/src/md/unix/uxrng.c b/pr/src/md/unix/uxrng.c index 339c70be..4eeb9bdc 100644 --- a/pr/src/md/unix/uxrng.c +++ b/pr/src/md/unix/uxrng.c @@ -64,7 +64,7 @@ GetHighResClock(void *buf, size_t maxbytes) #elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \ || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD) \ - || defined(SYMBIAN) || defined(__GNU__)) + || defined(__GNU__)) #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/pr/src/md/unix/uxshm.c b/pr/src/md/unix/uxshm.c index 54e68191..2a605b1f 100644 --- a/pr/src/md/unix/uxshm.c +++ b/pr/src/md/unix/uxshm.c @@ -231,12 +231,7 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name ) ("_MD_DeleteSharedMemory(): ftok() failed on name: %s", ipcname)); } -#ifdef SYMBIAN - /* In Symbian OS the system imposed minimum is 1 byte, instead of ZERO */ - id = shmget( key, 1, 0 ); -#else id = shmget( key, 0, 0 ); -#endif if ( -1 == id ) { _PR_MD_MAP_DEFAULT_ERROR( errno ); PR_LOG( _pr_shm_lm, PR_LOG_DEBUG, @@ -488,11 +483,7 @@ extern PRFileMap* _md_OpenAnonFileMap( ** make maxTries number of attempts at uniqueness in the filename */ for ( incr = 0; incr < maxTries ; incr++ ) { -#if defined(SYMBIAN) -#define NSPR_AFM_FILENAME "%s\\NSPR-AFM-%d-%p.%d" -#else #define NSPR_AFM_FILENAME "%s/.NSPR-AFM-%d-%p.%d" -#endif genName = PR_smprintf( NSPR_AFM_FILENAME, dirName, (int) pid, tid, incr ); if ( NULL == genName ) { @@ -529,13 +520,7 @@ extern PRFileMap* _md_OpenAnonFileMap( } urc = unlink( genName ); -#if defined(SYMBIAN) && defined(__WINS__) - /* If it is being used by the system or another process, Symbian OS - * Emulator(WINS) considers this an error. */ - if ( -1 == urc && EACCES != errno ) { -#else if ( -1 == urc ) { -#endif _PR_MD_MAP_UNLINK_ERROR( errno ); PR_LOG( _pr_shma_lm, PR_LOG_DEBUG, ("_md_OpenAnonFileMap(): failed on unlink(), errno: %d", errno)); diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c index 982331c1..fd575c8e 100644 --- a/pr/src/misc/prnetdb.c +++ b/pr/src/misc/prnetdb.c @@ -566,25 +566,6 @@ static PRStatus CopyHostent( return PR_SUCCESS; } -#ifdef SYMBIAN -/* Set p_aliases by hand because Symbian's getprotobyname() returns NULL. */ -static void AssignAliases(struct protoent *Protoent, char** aliases) -{ - if (NULL == Protoent->p_aliases) { - if (0 == strcmp(Protoent->p_name, "ip")) - aliases[0] = "IP"; - else if (0 == strcmp(Protoent->p_name, "tcp")) - aliases[0] = "TCP"; - else if (0 == strcmp(Protoent->p_name, "udp")) - aliases[0] = "UDP"; - else - aliases[0] = "UNKNOWN"; - aliases[1] = NULL; - Protoent->p_aliases = aliases; - } -} -#endif - #if !defined(_PR_HAVE_GETPROTO_R) /* ** Copy a protoent, and all of the memory that it refers to into @@ -1247,10 +1228,6 @@ PR_IMPLEMENT(PRStatus) PR_GetProtoByName( } else { -#if defined(SYMBIAN) - char* aliases[2]; - AssignAliases(staticBuf, aliases); -#endif rv = CopyProtoent(staticBuf, buffer, buflen, result); if (PR_FAILURE == rv) PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0); @@ -1331,10 +1308,6 @@ PR_IMPLEMENT(PRStatus) PR_GetProtoByNumber( } else { -#if defined(SYMBIAN) - char* aliases[2]; - AssignAliases(staticBuf, aliases); -#endif rv = CopyProtoent(staticBuf, buffer, buflen, result); if (PR_FAILURE == rv) PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0); diff --git a/pr/src/misc/prsystem.c b/pr/src/misc/prsystem.c index cdf7c6c3..8b7c25fa 100644 --- a/pr/src/misc/prsystem.c +++ b/pr/src/misc/prsystem.c @@ -208,7 +208,7 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void ) numCpus = -1; /* set to -1 for return value on error */ _PR_MD_MAP_DEFAULT_ERROR( _MD_ERRNO() ); } -#elif defined(RISCOS) || defined(SYMBIAN) +#elif defined(RISCOS) numCpus = 1; #elif defined(LINUX) /* for the benefit of devices with advanced power-saving, that diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c index f0378609..1487ec4d 100644 --- a/pr/src/misc/prtime.c +++ b/pr/src/misc/prtime.c @@ -1722,7 +1722,7 @@ PR_FormatTime(char *buf, int buflen, const char *fmt, #if (__GLIBC__ >= 2) || defined(XP_BEOS) \ || defined(NETBSD) || defined(OPENBSD) || defined(FREEBSD) \ - || defined(DARWIN) || defined(SYMBIAN) || defined(ANDROID) + || defined(DARWIN) || defined(ANDROID) a.tm_zone = NULL; a.tm_gmtoff = time->tm_params.tp_gmt_offset + time->tm_params.tp_dst_offset; diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index a8e0d689..f34b0f65 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -183,7 +183,7 @@ static PRBool _pr_ipv6_v6only_on_by_default; || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ || defined(BSDI) || defined(NTO) || defined(DARWIN) \ - || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) + || defined(UNIXWARE) || defined(RISCOS) #define _PRSelectFdSetArg_t fd_set * #else #error "Cannot determine architecture" @@ -1629,18 +1629,9 @@ static PRFileDesc* pt_Accept( PRFileDesc *newfd = NULL; PRIntn syserrno, osfd = -1; pt_SockLen addr_len = sizeof(PRNetAddr); -#ifdef SYMBIAN - PRNetAddr dummy_addr; -#endif if (pt_TestAbort()) return newfd; -#ifdef SYMBIAN - /* On Symbian OS, accept crashes if addr is NULL. */ - if (!addr) - addr = &dummy_addr; -#endif - #ifdef _PR_STRICT_ADDR_LEN if (addr) { @@ -1817,13 +1808,7 @@ static PRInt32 pt_Recv( osflags = 0; else if (PR_MSG_PEEK == flags) { -#ifdef SYMBIAN - /* MSG_PEEK doesn't work as expected. */ - PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); - return bytes; -#else osflags = MSG_PEEK; -#endif } else { @@ -3338,8 +3323,7 @@ static PRIOMethods _pr_socketpollfd_methods = { || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ || defined(AIX) || defined(FREEBSD) || defined(NETBSD) \ || defined(OPENBSD) || defined(BSDI) || defined(NTO) \ - || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) \ - || defined(SYMBIAN) + || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) #define _PR_FCNTL_FLAGS O_NONBLOCK #else #error "Can't determine architecture" @@ -4465,84 +4449,6 @@ PR_IMPLEMENT(PRFileDesc*) PR_OpenTCPSocket(PRIntn af) PR_IMPLEMENT(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2]) { -#ifdef SYMBIAN - /* - * For the platforms that don't have socketpair. - * - * Copied from prsocket.c, with the parameter f[] renamed fds[] and the - * _PR_CONNECT_DOES_NOT_BIND code removed. - */ - PRFileDesc *listenSock; - PRNetAddr selfAddr, peerAddr; - PRUint16 port; - - fds[0] = fds[1] = NULL; - listenSock = PR_NewTCPSocket(); - if (listenSock == NULL) { - goto failed; - } - PR_InitializeNetAddr(PR_IpAddrLoopback, 0, &selfAddr); /* BugZilla: 35408 */ - if (PR_Bind(listenSock, &selfAddr) == PR_FAILURE) { - goto failed; - } - if (PR_GetSockName(listenSock, &selfAddr) == PR_FAILURE) { - goto failed; - } - port = ntohs(selfAddr.inet.port); - if (PR_Listen(listenSock, 5) == PR_FAILURE) { - goto failed; - } - fds[0] = PR_NewTCPSocket(); - if (fds[0] == NULL) { - goto failed; - } - PR_InitializeNetAddr(PR_IpAddrLoopback, port, &selfAddr); - - /* - * Only a thread is used to do the connect and accept. - * I am relying on the fact that PR_Connect returns - * successfully as soon as the connect request is put - * into the listen queue (but before PR_Accept is called). - * This is the behavior of the BSD socket code. If - * connect does not return until accept is called, we - * will need to create another thread to call connect. - */ - if (PR_Connect(fds[0], &selfAddr, PR_INTERVAL_NO_TIMEOUT) - == PR_FAILURE) { - goto failed; - } - /* - * A malicious local process may connect to the listening - * socket, so we need to verify that the accepted connection - * is made from our own socket fds[0]. - */ - if (PR_GetSockName(fds[0], &selfAddr) == PR_FAILURE) { - goto failed; - } - fds[1] = PR_Accept(listenSock, &peerAddr, PR_INTERVAL_NO_TIMEOUT); - if (fds[1] == NULL) { - goto failed; - } - if (peerAddr.inet.port != selfAddr.inet.port) { - /* the connection we accepted is not from fds[0] */ - PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0); - goto failed; - } - PR_Close(listenSock); - return PR_SUCCESS; - -failed: - if (listenSock) { - PR_Close(listenSock); - } - if (fds[0]) { - PR_Close(fds[0]); - } - if (fds[1]) { - PR_Close(fds[1]); - } - return PR_FAILURE; -#else PRInt32 osfd[2]; if (pt_TestAbort()) return PR_FAILURE; @@ -4565,7 +4471,6 @@ failed: return PR_FAILURE; } return PR_SUCCESS; -#endif } /* PR_NewTCPSocketPair */ PR_IMPLEMENT(PRStatus) PR_CreatePipe( @@ -4794,7 +4699,7 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRFileDesc *fd) PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void) { -#if defined(AIX) || defined(SYMBIAN) +#if defined(AIX) return sysconf(_SC_OPEN_MAX); #else struct rlimit rlim; @@ -4808,7 +4713,7 @@ PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void) PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(PRIntn table_size) { -#if defined(AIX) || defined(SYMBIAN) +#if defined(AIX) return -1; #else struct rlimit rlim; diff --git a/pr/src/pthreads/ptsynch.c b/pr/src/pthreads/ptsynch.c index 126bed67..ad337c26 100644 --- a/pr/src/pthreads/ptsynch.c +++ b/pr/src/pthreads/ptsynch.c @@ -913,7 +913,7 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphore(const char *name) #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \ || (defined(FREEBSD) && __FreeBSD_version < 1200059) \ || defined(OPENBSD) || defined(BSDI) \ - || defined(DARWIN) || defined(SYMBIAN) + || defined(DARWIN) /* union semun is defined by including <sys/sem.h> */ #else /* according to X/OPEN we have to define it ourselves */ diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c index 069870da..01508002 100644 --- a/pr/src/pthreads/ptthread.c +++ b/pr/src/pthreads/ptthread.c @@ -29,13 +29,6 @@ #include <sys/prctl.h> #endif -#ifdef SYMBIAN -/* In Open C sched_get_priority_min/max do not work properly, so we undefine - * _POSIX_THREAD_PRIORITY_SCHEDULING here. - */ -#undef _POSIX_THREAD_PRIORITY_SCHEDULING -#endif - #ifdef _PR_NICE_PRIORITY_SCHEDULING #undef _POSIX_THREAD_PRIORITY_SCHEDULING #include <sys/resource.h> @@ -1186,7 +1179,6 @@ static void null_signal_handler(PRIntn sig); */ static void init_pthread_gc_support(void) { -#ifndef SYMBIAN PRIntn rv; { @@ -1216,7 +1208,6 @@ static void init_pthread_gc_support(void) PR_ASSERT(0 ==rv); } #endif /* defined(PT_NO_SIGTIMEDWAIT) */ -#endif /* SYMBIAN */ } PR_IMPLEMENT(void) PR_SetThreadGCAble(void) @@ -1362,8 +1353,7 @@ static void suspend_signal_handler(PRIntn sig) { #if !defined(FREEBSD) && !defined(NETBSD) && !defined(OPENBSD) \ && !defined(BSDI) && !defined(UNIXWARE) \ - && !defined(DARWIN) && !defined(RISCOS) \ - && !defined(SYMBIAN) /*XXX*/ + && !defined(DARWIN) && !defined(RISCOS) PRIntn rv; sigwait(&sigwait_set, &rv); #endif @@ -1407,12 +1397,7 @@ static void pt_SuspendSet(PRThread *thred) PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("doing pthread_kill in pt_SuspendSet thred %p tid = %X\n", thred, thred->id)); -#if defined(SYMBIAN) - /* All signal group functions are not implemented in Symbian OS */ - rv = 0; -#else rv = pthread_kill (thred->id, SIGUSR2); -#endif PR_ASSERT(0 == rv); } @@ -1464,12 +1449,8 @@ static void pt_ResumeSet(PRThread *thred) thred->suspend &= ~PT_THREAD_SUSPENDED; #if defined(PT_NO_SIGTIMEDWAIT) -#if defined(SYMBIAN) - /* All signal group functions are not implemented in Symbian OS */ -#else pthread_kill(thred->id, SIGUSR1); #endif -#endif } /* pt_ResumeSet */ diff --git a/pr/tests/accept.c b/pr/tests/accept.c index b327eb21..f49bb44d 100644 --- a/pr/tests/accept.c +++ b/pr/tests/accept.c @@ -51,7 +51,7 @@ #define SERVER_MAX_BIND_COUNT 100 -#if defined(XP_OS2) || defined(SYMBIAN) +#if defined(XP_OS2) #define TIMEOUTSECS 10 #else #define TIMEOUTSECS 2 diff --git a/pr/tests/acceptread.c b/pr/tests/acceptread.c index 184cfcbb..47ba90bd 100644 --- a/pr/tests/acceptread.c +++ b/pr/tests/acceptread.c @@ -33,11 +33,7 @@ static PRStatus PrintAddress(const PRNetAddr* address) static void ConnectingThread(void *arg) { PRInt32 nbytes; -#ifdef SYMBIAN - char buf[256]; -#else char buf[1024]; -#endif PRFileDesc *sock; PRNetAddr peer_addr, *addr; diff --git a/pr/tests/acceptreademu.c b/pr/tests/acceptreademu.c index 981cebad..efe28cb9 100644 --- a/pr/tests/acceptreademu.c +++ b/pr/tests/acceptreademu.c @@ -48,11 +48,7 @@ static PRStatus PrintAddress(const PRNetAddr* address) static void ConnectingThread(void *arg) { PRInt32 nbytes; -#ifdef SYMBIAN - char buf[256]; -#else char buf[1024]; -#endif PRFileDesc *sock; PRNetAddr peer_addr, *addr; diff --git a/pr/tests/bigfile.c b/pr/tests/bigfile.c index 199f57b5..35bf1570 100644 --- a/pr/tests/bigfile.c +++ b/pr/tests/bigfile.c @@ -151,11 +151,7 @@ int main(int argc, char **argv) if (0 == filesize) filesize = DEFAULT_FILESIZE; if (NULL == filename) { -#ifdef SYMBIAN -#define FILE_NAME "c:\\data\\bigfile.dat" -#else #define FILE_NAME "bigfile.dat" -#endif if (DEFAULT_FILESIZE != filesize) return Usage(); else filename = FILE_NAME; } diff --git a/pr/tests/foreign.c b/pr/tests/foreign.c index f4d80504..167d7601 100644 --- a/pr/tests/foreign.c +++ b/pr/tests/foreign.c @@ -223,11 +223,7 @@ static void OneShot(void *arg) break; case 6: -#ifdef SYMBIAN -#define TEMP_DIR "c:\\data\\" -#else #define TEMP_DIR "/tmp/" -#endif dir = PR_OpenDir(TEMP_DIR); DPRINTF((output,"Thread[0x%x] called PR_OpenDir\n", PR_GetCurrentThread())); diff --git a/pr/tests/nameshm1.c b/pr/tests/nameshm1.c index 945540b5..490ecb5d 100644 --- a/pr/tests/nameshm1.c +++ b/pr/tests/nameshm1.c @@ -72,17 +72,10 @@ #include <string.h> #include <private/primpl.h> -#ifdef SYMBIAN -#define SEM_NAME1 "c:\\data\\nameshmSEM1" -#define SEM_NAME2 "c:\\data\\nameshmSEM2" -#define OPT_NAME "c:\\data\\xxxNSPRshm" -#define EXE_NAME "nspr_tests_nameshm1.exe" -#else #define SEM_NAME1 "/tmp/nameshmSEM1" #define SEM_NAME2 "/tmp/nameshmSEM2" #define OPT_NAME "/tmp/xxxNSPRshm" #define EXE_NAME "nameshm1" -#endif #define SEM_MODE 0666 #define SHM_MODE 0666 diff --git a/pr/tests/nonblock.c b/pr/tests/nonblock.c index e94b1b44..30f3e7d3 100644 --- a/pr/tests/nonblock.c +++ b/pr/tests/nonblock.c @@ -23,9 +23,6 @@ ** Make win16 unit_time interval 300 milliseconds, others get 100 */ #define UNIT_TIME 200 /* unit time in milliseconds */ -#elif defined(SYMBIAN) -#define UNIT_TIME 5000 /* unit time in milliseconds */ -#else #define UNIT_TIME 100 /* unit time in milliseconds */ #endif #define CHUNK_SIZE 10 diff --git a/pr/tests/pipeself.c b/pr/tests/pipeself.c index 52e6b134..a3acf70b 100644 --- a/pr/tests/pipeself.c +++ b/pr/tests/pipeself.c @@ -144,7 +144,7 @@ int main(int argc, char **argv) exit(1); } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) /* * Test PR_Available for pipes */ diff --git a/pr/tests/prpollml.c b/pr/tests/prpollml.c index 6894c525..cef22052 100644 --- a/pr/tests/prpollml.c +++ b/pr/tests/prpollml.c @@ -15,14 +15,10 @@ #include <stdlib.h> #include <string.h> -#ifdef SYMBIAN -#define POLL_DESC_COUNT 128 -#else #define POLL_DESC_COUNT 256 /* This should be greater than the * STACK_POLL_DESC_COUNT macro in * ptio.c to cause syspoll_list to * be created. */ -#endif static PRPollDesc pd[POLL_DESC_COUNT]; diff --git a/pr/tests/sel_spd.c b/pr/tests/sel_spd.c index df5cd9c4..10d49786 100644 --- a/pr/tests/sel_spd.c +++ b/pr/tests/sel_spd.c @@ -15,9 +15,6 @@ #include <stdio.h> #include <errno.h> #include <string.h> -#ifdef SYMBIAN -#include <getopt.h> -#endif #define PORT_BASE 19000 @@ -33,19 +30,8 @@ typedef struct timer_slot_t { static long _iterations = 5; static long _client_data = 8192; -#ifdef SYMBIAN -/* - * Symbian OS does not scale well specially the requirement for thread stack - * space and buffer allocation space. It is easy to get into a fragmented - * memory and not be able to allocate thread stack or client/server data - * buffer. - */ -static long _server_data = (8*1024); -static long _threads_max = 10, _threads = 10; -#else static long _server_data = (128*1024); static long _threads_max = 10, _threads = 10; -#endif static int verbose=0; static PRMonitor *exit_cv; diff --git a/pr/tests/selintr.c b/pr/tests/selintr.c index 13621f74..84513f68 100644 --- a/pr/tests/selintr.c +++ b/pr/tests/selintr.c @@ -29,9 +29,6 @@ int main() #include <sys/time.h> #include <stdio.h> -#ifdef SYMBIAN -#include <sys/select.h> -#endif int main(int argc, char **argv) { diff --git a/pr/tests/semaerr.c b/pr/tests/semaerr.c index b27428f3..4da7c1c1 100644 --- a/pr/tests/semaerr.c +++ b/pr/tests/semaerr.c @@ -8,15 +8,9 @@ #include <stdio.h> -#ifdef SYMBIAN -#define NO_SUCH_SEM_NAME "c:\\data\\nosuchsem.sem" -#define SEM_NAME1 "c:\\data\\foo.sem" -#define EXE_NAME "nspr_tests_semaerr1.exe" -#else #define NO_SUCH_SEM_NAME "/tmp/nosuchsem.sem" #define SEM_NAME1 "/tmp/foo.sem" #define EXE_NAME "semaerr1" -#endif #define SEM_MODE 0666 static PRBool debug_mode = PR_FALSE; diff --git a/pr/tests/semaerr1.c b/pr/tests/semaerr1.c index fd1463db..f56a97ee 100644 --- a/pr/tests/semaerr1.c +++ b/pr/tests/semaerr1.c @@ -8,13 +8,8 @@ #include <stdio.h> -#ifdef SYMBIAN -#define SEM_NAME1 "c:\\data\\foo.sem" -#define SEM_NAME2 "c:\\data\\bar.sem" -#else #define SEM_NAME1 "/tmp/foo.sem" #define SEM_NAME2 "/tmp/bar.sem" -#endif #define SEM_MODE 0666 static PRBool debug_mode = PR_FALSE; diff --git a/pr/tests/semaping.c b/pr/tests/semaping.c index 007a5239..60be8dea 100644 --- a/pr/tests/semaping.c +++ b/pr/tests/semaping.c @@ -8,17 +8,10 @@ #include <stdio.h> -#ifdef SYMBIAN -#define SHM_NAME "c:\\data\\counter" -#define SEM_NAME1 "c:\\data\\foo.sem" -#define SEM_NAME2 "c:\\data\\bar.sem" -#define EXE_NAME "nspr_tests_semapong.exe" -#else #define SHM_NAME "/tmp/counter" #define SEM_NAME1 "/tmp/foo.sem" #define SEM_NAME2 "/tmp/bar.sem" #define EXE_NAME "semapong" -#endif #define SEM_MODE 0666 #define SHM_MODE 0666 #define ITERATIONS 1000 diff --git a/pr/tests/semapong.c b/pr/tests/semapong.c index 16dea62a..37940dd4 100644 --- a/pr/tests/semapong.c +++ b/pr/tests/semapong.c @@ -8,15 +8,9 @@ #include <stdio.h> -#ifdef SYMBIAN -#define SHM_NAME "c:\\data\\counter" -#define SEM_NAME1 "c:\\data\\foo.sem" -#define SEM_NAME2 "c:\\data\\bar.sem" -#else #define SHM_NAME "/tmp/counter" #define SEM_NAME1 "/tmp/foo.sem" #define SEM_NAME2 "/tmp/bar.sem" -#endif #define ITERATIONS 1000 static PRBool debug_mode = PR_FALSE; diff --git a/pr/tests/server_test.c b/pr/tests/server_test.c index b794a7fe..b1750ec2 100644 --- a/pr/tests/server_test.c +++ b/pr/tests/server_test.c @@ -185,11 +185,7 @@ WorkerThreadFunc(void *_listenSock) if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead); PR_AtomicIncrement(&workerThreadsBusy); -#ifdef SYMBIAN - if (workerThreadsBusy == workerThreads && workerThreads<1) { -#else if (workerThreadsBusy == workerThreads) { -#endif PR_Lock(workerThreadsLock); if (workerThreadsBusy == workerThreads) { PRThread *WorkerThread; @@ -577,7 +573,6 @@ int main(int argc, char **argv) PL_DestroyOptState(opt); /* main test */ -#ifndef SYMBIAN if (debug_mode) { printf("Enter number of iterations: \n"); scanf("%d", &_iterations); @@ -589,7 +584,6 @@ int main(int argc, char **argv) scanf("%d", &_server_data); } else -#endif { _iterations = 10; diff --git a/pr/tests/servr_kk.c b/pr/tests/servr_kk.c index 3e02027d..836c1484 100644 --- a/pr/tests/servr_kk.c +++ b/pr/tests/servr_kk.c @@ -149,11 +149,7 @@ WorkerThreadFunc(void *_listenSock) if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead); PR_AtomicIncrement(&workerThreadsBusy); -#ifdef SYMBIAN - if (workerThreadsBusy == workerThreads && workerThreads<1) { -#else if (workerThreadsBusy == workerThreads) { -#endif PR_Lock(workerThreadsLock); if (workerThreadsBusy == workerThreads) { PRThread *WorkerThread; @@ -541,7 +537,6 @@ int main(int argc, char **argv) PL_DestroyOptState(opt); /* main test */ -#ifndef SYMBIAN if (debug_mode) { printf("Enter number of iterations: \n"); scanf("%d", &_iterations); @@ -553,7 +548,6 @@ int main(int argc, char **argv) scanf("%d", &_server_data); } else -#endif { _iterations = 7; _clients = 7; diff --git a/pr/tests/servr_ku.c b/pr/tests/servr_ku.c index 1a54fc76..c120ad01 100644 --- a/pr/tests/servr_ku.c +++ b/pr/tests/servr_ku.c @@ -150,11 +150,7 @@ WorkerThreadFunc(void *_listenSock) if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead); PR_AtomicIncrement(&workerThreadsBusy); -#ifdef SYMBIAN - if (workerThreadsBusy == workerThreads && workerThreads<1) { -#else if (workerThreadsBusy == workerThreads) { -#endif PR_Lock(workerThreadsLock); if (workerThreadsBusy == workerThreads) { PRThread *WorkerThread; @@ -523,7 +519,6 @@ int main(int argc, char **argv) PL_DestroyOptState(opt); /* main test */ -#ifndef SYMBIAN if (debug_mode) { printf("Enter number of iterations: \n"); scanf("%d", &_iterations); @@ -535,7 +530,6 @@ int main(int argc, char **argv) scanf("%d", &_server_data); } else -#endif { _iterations = 7; _clients = 7; diff --git a/pr/tests/servr_uk.c b/pr/tests/servr_uk.c index c61ad988..896309e7 100644 --- a/pr/tests/servr_uk.c +++ b/pr/tests/servr_uk.c @@ -152,11 +152,7 @@ WorkerThreadFunc(void *_listenSock) if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead); PR_AtomicIncrement(&workerThreadsBusy); -#ifdef SYMBIAN - if (workerThreadsBusy == workerThreads && workerThreads<1) { -#else if (workerThreadsBusy == workerThreads) { -#endif PR_Lock(workerThreadsLock); if (workerThreadsBusy == workerThreads) { PRThread *WorkerThread; @@ -525,7 +521,6 @@ int main(int argc, char **argv) PL_DestroyOptState(opt); /* main test */ -#ifndef SYMBIAN if (debug_mode) { printf("Enter number of iterations: \n"); scanf("%d", &_iterations); @@ -537,7 +532,6 @@ int main(int argc, char **argv) scanf("%d", &_server_data); } else -#endif { _iterations = 7; _clients = 7; diff --git a/pr/tests/servr_uu.c b/pr/tests/servr_uu.c index 82cd7d9c..a9638feb 100644 --- a/pr/tests/servr_uu.c +++ b/pr/tests/servr_uu.c @@ -150,11 +150,7 @@ WorkerThreadFunc(void *_listenSock) if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead); PR_AtomicIncrement(&workerThreadsBusy); -#ifdef SYMBIAN - if (workerThreadsBusy == workerThreads && workerThreads<1) { -#else if (workerThreadsBusy == workerThreads) { -#endif PR_Lock(workerThreadsLock); if (workerThreadsBusy == workerThreads) { @@ -523,7 +519,6 @@ int main(int argc, char **argv) PL_DestroyOptState(opt); /* main test */ -#ifndef SYMBIAN if (debug_mode) { printf("Enter number of iterations: \n"); scanf("%d", &_iterations); @@ -535,7 +530,6 @@ int main(int argc, char **argv) scanf("%d", &_server_data); } else -#endif { _iterations = 7; _clients = 7; diff --git a/pr/tests/sigpipe.c b/pr/tests/sigpipe.c index 0d37cbea..f6c27649 100644 --- a/pr/tests/sigpipe.c +++ b/pr/tests/sigpipe.c @@ -60,12 +60,7 @@ static void Test(void *arg) fprintf(stderr, "write to broken pipe should have failed with EPIPE but returned %d\n", rv); exit(1); } -#ifdef SYMBIAN - /* Have mercy on the unknown 142 errno, it seems ok */ - if (errno != EPIPE && errno != 142) { -#else if (errno != EPIPE) { -#endif fprintf(stderr, "write to broken pipe failed but with wrong errno: %d\n", errno); exit(1); } diff --git a/pr/tests/socket.c b/pr/tests/socket.c index 92f019d0..00c7341c 100644 --- a/pr/tests/socket.c +++ b/pr/tests/socket.c @@ -44,10 +44,6 @@ static int test_cancelio = 0; char *TEST_DIR = "prdir"; char *SMALL_FILE_NAME = "prsmallf"; char *LARGE_FILE_NAME = "prlargef"; -#elif defined(SYMBIAN) -char *TEST_DIR = "c:\\data\\prsocket"; -char *SMALL_FILE_NAME = "c:\\data\\prsocket\\small_file"; -char *LARGE_FILE_NAME = "c:\\data\\prsocket\\large_file"; #else char *TEST_DIR = "/tmp/prsocket_test_dir"; char *SMALL_FILE_NAME = "/tmp/prsocket_test_dir/small_file"; @@ -85,11 +81,7 @@ char *LARGE_FILE_NAME = "/tmp/prsocket_test_dir/large_file"; #define NUM_TCP_CLIENTS 5 /* for a listen queue depth of 5 */ #define NUM_UDP_CLIENTS 10 -#ifdef SYMBIAN -#define NUM_TRANSMITFILE_CLIENTS 1 -#else #define NUM_TRANSMITFILE_CLIENTS 4 -#endif #define NUM_TCP_CONNECTIONS_PER_CLIENT 5 #define NUM_TCP_MESGS_PER_CONNECTION 10 @@ -270,7 +262,6 @@ Serve_Client(void *arg) goto exit; } /* Shutdown only RCV will cause error on Symbian OS */ -#if !defined(SYMBIAN) /* * shutdown reads, after the last read */ @@ -278,7 +269,6 @@ Serve_Client(void *arg) if (PR_Shutdown(sockfd, PR_SHUTDOWN_RCV) < 0) { fprintf(stderr,"prsocket_test: ERROR - PR_Shutdown\n"); } -#endif DPRINTF(("Serve_Client [0x%lx]: inbuf[0] = 0x%lx\n",PR_GetCurrentThread(), (*((int *) in_buf->data)))); if (writen(sockfd, in_buf->data, bytes) < bytes) { @@ -697,9 +687,6 @@ TCP_Client(void *arg) */ if (PR_Shutdown(sockfd, PR_SHUTDOWN_BOTH) < 0) { fprintf(stderr,"prsocket_test: ERROR - PR_Shutdown\n"); -#if defined(SYMBIAN) - if (EPIPE != errno) -#endif failed_already=1; } PR_Close(sockfd); @@ -1146,7 +1133,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) /* File transmission test can not be done because of large file's size */ if (memcmp(small_file_header, small_buf, SMALL_FILE_HEADER_SIZE) != 0){ fprintf(stderr, @@ -1171,7 +1158,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(large_file_addr, large_buf, LARGE_FILE_SIZE) != 0) { fprintf(stderr, "prsocket_test: TransmitFile_Client ERROR - large file data corruption\n"); @@ -1194,7 +1181,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(small_file_header, small_buf, SMALL_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 1. ERROR - small file header corruption\n"); @@ -1228,7 +1215,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(large_file_header, large_buf, LARGE_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 2. ERROR - large file header corruption\n"); @@ -1261,7 +1248,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(small_file_header, small_buf, SMALL_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 3. ERROR - small file header corruption\n"); @@ -1286,7 +1273,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp((char *) small_file_addr + SMALL_FILE_OFFSET_2, small_buf, SMALL_FILE_LEN_2) != 0) { fprintf(stderr, @@ -1312,7 +1299,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(large_file_header, large_buf, LARGE_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 5. ERROR - large file header corruption\n"); @@ -1338,7 +1325,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(small_file_header, small_buf, SMALL_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 6. ERROR - small file header corruption\n"); @@ -1376,7 +1363,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(large_file_header, large_buf, LARGE_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 7. ERROR - large file header corruption\n"); @@ -1404,7 +1391,7 @@ TransmitFile_Client(void *arg) failed_already=1; return; } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) if (memcmp(large_file_header, large_buf, LARGE_FILE_HEADER_SIZE) != 0){ fprintf(stderr, "SendFile 2. ERROR - large file header corruption\n"); @@ -1993,7 +1980,7 @@ Socket_Misc_Test(void) } count += bytes; } while (count < LARGE_FILE_SIZE); -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) /* * map the large file; used in checking for data corruption */ @@ -2126,7 +2113,7 @@ done: if (buf) { PR_DELETE(buf); } -#if defined(XP_UNIX) && !defined(SYMBIAN) +#if defined(XP_UNIX) munmap((char*)small_file_addr, SMALL_FILE_SIZE); munmap((char*)large_file_addr, LARGE_FILE_SIZE); #endif @@ -2237,61 +2224,13 @@ int main(int argc, char **argv) printf("TCP_Socket_Client_Server_Test Passed\n"); test_cancelio = 0; -#if defined(SYMBIAN) && !defined(__WINSCW__) - /* UDP tests only run on Symbian devices but not emulator */ - /* - * run client-server test with UDP, IPv4/IPv4 - */ - printf("UDP Client/Server Test - IPv4/Ipv4\n"); - client_domain = PR_AF_INET; - server_domain = PR_AF_INET; - if (UDP_Socket_Client_Server_Test() < 0) { - printf("UDP_Socket_Client_Server_Test failed\n"); - goto done; - } else - printf("UDP_Socket_Client_Server_Test Passed\n"); - /* - * run client-server test with UDP, IPv6/IPv4 - */ - printf("UDP Client/Server Test - IPv6/Ipv4\n"); - client_domain = PR_AF_INET6; - server_domain = PR_AF_INET; - if (UDP_Socket_Client_Server_Test() < 0) { - printf("UDP_Socket_Client_Server_Test failed\n"); - goto done; - } else - printf("UDP_Socket_Client_Server_Test Passed\n"); - /* - * run client-server test with UDP,IPv4-IPv6 - */ - printf("UDP Client/Server Test - IPv4/Ipv6\n"); - client_domain = PR_AF_INET; - server_domain = PR_AF_INET6; - if (UDP_Socket_Client_Server_Test() < 0) { - printf("UDP_Socket_Client_Server_Test failed\n"); - goto done; - } else - printf("UDP_Socket_Client_Server_Test Passed\n"); - /* - * run client-server test with UDP,IPv6-IPv6 - */ - printf("UDP Client/Server Test - IPv6/Ipv6\n"); - client_domain = PR_AF_INET6; - server_domain = PR_AF_INET6; - if (UDP_Socket_Client_Server_Test() < 0) { - printf("UDP_Socket_Client_Server_Test failed\n"); - goto done; - } else - printf("UDP_Socket_Client_Server_Test Passed\n"); -#endif - /* * Misc socket tests - including transmitfile, etc. */ /* File transmission test can not be done in Symbian OS because of * large file's size and the incomplete mmap() implementation. */ -#if !defined(WIN16) && !defined(SYMBIAN) +#if !defined(WIN16) /* ** The 'transmit file' test does not run because ** transmit file is not implemented in NSPR yet. diff --git a/pr/tests/sockopt.c b/pr/tests/sockopt.c index b9b2f6dd..c83ecea0 100644 --- a/pr/tests/sockopt.c +++ b/pr/tests/sockopt.c @@ -87,12 +87,10 @@ int main(int argc, char **argv) case PR_SockOpt_Nonblocking: data.value.non_blocking = PR_TRUE; break; -#ifndef SYMBIAN case PR_SockOpt_Linger: data.value.linger.polarity = PR_TRUE; data.value.linger.linger = PR_SecondsToInterval(2); break; -#endif case PR_SockOpt_Reuseaddr: data.value.reuse_addr = PR_TRUE; break; @@ -105,7 +103,6 @@ int main(int argc, char **argv) case PR_SockOpt_SendBufferSize: data.value.send_buffer_size = segment; break; -#ifndef SYMBIAN case PR_SockOpt_IpTimeToLive: data.value.ip_ttl = 64; break; @@ -120,7 +117,6 @@ int main(int argc, char **argv) fd = udp; data.value.mcast_loopback = PR_TRUE; break; -#endif case PR_SockOpt_NoDelay: data.value.no_delay = PR_TRUE; break; @@ -129,12 +125,10 @@ int main(int argc, char **argv) data.value.max_segment = segment; break; #endif -#ifndef SYMBIAN case PR_SockOpt_Broadcast: fd = udp; data.value.broadcast = PR_TRUE; break; -#endif #ifdef SO_REUSEPORT case PR_SockOpt_Reuseport: data.value.reuse_port = PR_TRUE; diff --git a/pr/tests/stack.c b/pr/tests/stack.c index 182191ad..e294701a 100644 --- a/pr/tests/stack.c +++ b/pr/tests/stack.c @@ -53,7 +53,7 @@ PRFileDesc *errhandle; int main(int argc, char **argv) { -#if !(defined(SYMBIAN) && defined(__WINS__)) +#if defined(__WINS__)) PRInt32 rv, cnt, sum; DataRecord *Item; PRStack *list1, *list2; diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c index 1191bfe9..0bd28cf9 100644 --- a/pr/tests/testfile.c +++ b/pr/tests/testfile.c @@ -16,9 +16,6 @@ #if defined(_PR_PTHREADS) #include <pthread.h> #endif -#ifdef SYMBIAN -#include <getopt.h> -#endif #if defined(XP_OS2) #define INCL_DOSFILEMGR @@ -74,9 +71,6 @@ char *TEST_DIR = "C:\\temp\\prdir"; char *FILE_NAME = "pr_testfile"; char *HIDDEN_FILE_NAME = "hidden_pr_testfile"; #else -#ifdef SYMBIAN -char *TEST_DIR = "c:\\data\\testfile_dir"; -#else char *TEST_DIR = "/tmp/testfile_dir"; #endif char *FILE_NAME = "pr_testfile"; diff --git a/pr/tests/zerolen.c b/pr/tests/zerolen.c index a31d419e..339d35a9 100644 --- a/pr/tests/zerolen.c +++ b/pr/tests/zerolen.c @@ -95,9 +95,6 @@ int main() char buf[1024]; PRInt32 nbytes; PRIOVec iov; -#ifdef SYMBIAN - int loopcount=0; -#endif memset(buf, 0, sizeof(buf)); /* Initialize the buffer. */ listenSock = PR_NewTCPSocket(); @@ -141,9 +138,6 @@ int main() osfd = PR_FileDesc2NativeHandle(acceptSock); while ((nbytes = write(osfd, buf, sizeof(buf))) != -1) { /* empty loop body */ -#ifdef SYMBIAN - if (loopcount++>64) break; -#endif } if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { fprintf(stderr, "write failed\n"); @@ -177,9 +171,6 @@ int main() fprintf(stderr, "PR_CreateThread failed\n"); exit(1); } -#ifdef SYMBIAN - loopcount = 0; -#endif acceptSock = PR_Accept(listenSock, NULL, PR_INTERVAL_NO_TIMEOUT); if (NULL == acceptSock) { fprintf(stderr, "PR_Accept failed\n"); @@ -188,9 +179,6 @@ int main() osfd = PR_FileDesc2NativeHandle(acceptSock); while ((nbytes = write(osfd, buf, sizeof(buf))) != -1) { /* empty loop body */ -#ifdef SYMBIAN - if (loopcount++>64) break; -#endif } if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { fprintf(stderr, "write failed\n"); @@ -222,9 +210,6 @@ int main() fprintf(stderr, "PR_CreateThread failed\n"); exit(1); } -#ifdef SYMBIAN - loopcount = 0; -#endif acceptSock = PR_Accept(listenSock, NULL, PR_INTERVAL_NO_TIMEOUT); if (NULL == acceptSock) { fprintf(stderr, "PR_Accept failed\n"); @@ -233,9 +218,6 @@ int main() osfd = PR_FileDesc2NativeHandle(acceptSock); while ((nbytes = write(osfd, buf, sizeof(buf))) != -1) { /* empty loop body */ -#ifdef SYMBIAN - if (loopcount++>64) break; -#endif } if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { fprintf(stderr, "write failed\n"); |