[X2Go-Commits] [pale-moon] 187/294: Issue #187: Remove solaris conditional code.

git-admin at x2go.org git-admin at x2go.org
Sat Apr 27 08:58:09 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch upstream/28.5.0
in repository pale-moon.

commit 25779d371c571e4f51792af3e3c5588b3186e934
Author: wolfbeast <mcwerewolf at wolfbeast.com>
Date:   Sat Mar 30 19:10:17 2019 +0100

    Issue #187: Remove solaris conditional code.
---
 accessible/tests/mochitest/common.js               |  1 -
 .../tests/mochitest/elm/test_nsApplicationAcc.html |  2 +-
 .../mochitest/treeupdate/test_contextmenu.xul      |  6 +-
 .../tests/mochitest/treeupdate/test_menu.xul       |  4 +-
 application/basilisk/installer/package-manifest.in |  7 --
 application/palemoon/installer/package-manifest.in |  7 --
 dom/base/nsContentUtils.h                          |  4 -
 dom/plugins/base/nsPluginsDirUnix.cpp              |  6 +-
 gfx/thebes/gfxFontconfigFonts.cpp                  |  7 --
 js/src/builtin/TestingFunctions.cpp                |  4 -
 js/src/ctypes/CTypes.cpp                           |  4 -
 js/src/gc/Memory.cpp                               | 85 ----------------------
 js/src/jsapi-tests/testGCAllocator.cpp             | 12 +--
 js/src/jsnativestack.cpp                           | 14 ----
 js/src/vm/Time.cpp                                 | 11 ---
 js/src/wasm/WasmSignalHandlers.cpp                 |  2 +-
 js/xpconnect/src/XPCShellImpl.cpp                  |  2 -
 layout/style/nsRuleNode.cpp                        |  3 -
 memory/mozjemalloc/jemalloc.c                      | 27 +------
 toolkit/mozapps/update/common/updatedefines.h      |  4 -
 toolkit/mozapps/update/updater/updater.cpp         | 82 ---------------------
 toolkit/xre/nsSigHandlers.cpp                      | 55 --------------
 xpcom/base/nsDebugImpl.cpp                         |  8 --
 xpcom/base/nsMemoryReporterManager.cpp             | 83 ---------------------
 xpcom/ds/nsMathUtils.h                             |  4 -
 xpcom/io/nsLocalFileUnix.cpp                       | 16 ----
 26 files changed, 12 insertions(+), 448 deletions(-)

diff --git a/accessible/tests/mochitest/common.js b/accessible/tests/mochitest/common.js
index 1e48fa0..b3f83ea 100644
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -59,7 +59,6 @@ const nsIPropertyElement = Components.interfaces.nsIPropertyElement;
 
 const MAC = (navigator.platform.indexOf("Mac") != -1);
 const LINUX = (navigator.platform.indexOf("Linux") != -1);
-const SOLARIS = (navigator.platform.indexOf("SunOS") != -1);
 const WIN = (navigator.platform.indexOf("Win") != -1);
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/accessible/tests/mochitest/elm/test_nsApplicationAcc.html b/accessible/tests/mochitest/elm/test_nsApplicationAcc.html
index 58763e4..e23eb37 100644
--- a/accessible/tests/mochitest/elm/test_nsApplicationAcc.html
+++ b/accessible/tests/mochitest/elm/test_nsApplicationAcc.html
@@ -32,7 +32,7 @@
 
       // nsIAccessible::name
       var applicationName = "";
-      if (LINUX || SOLARIS) {
+      if (LINUX) {
         applicationName = appInfo.name;
       } else {
         try {
diff --git a/accessible/tests/mochitest/treeupdate/test_contextmenu.xul b/accessible/tests/mochitest/treeupdate/test_contextmenu.xul
index 5b31e01..916b815 100644
--- a/accessible/tests/mochitest/treeupdate/test_contextmenu.xul
+++ b/accessible/tests/mochitest/treeupdate/test_contextmenu.xul
@@ -130,7 +130,7 @@
      */
     function getMenuTree1()
     {
-      if (LINUX || SOLARIS) {
+      if (LINUX) {
         var tree = {
           role: ROLE_MENUPOPUP,
           children: [
@@ -190,7 +190,7 @@
     function getMenuTree2()
     {
       var tree = getMenuTree1();
-      if (LINUX || SOLARIS) {
+      if (LINUX) {
         var submenuTree =
         {
           name: "item2.0",
@@ -232,7 +232,7 @@
         children: []
       };
 
-      if (LINUX || SOLARIS)
+      if (LINUX)
         tree.children[2].children[0].children.push(subsubmenuTree);
       else
         tree.children[2].children[0].children[0].children[0].children.push(subsubmenuTree);
diff --git a/accessible/tests/mochitest/treeupdate/test_menu.xul b/accessible/tests/mochitest/treeupdate/test_menu.xul
index abdea21..d62ac8c 100644
--- a/accessible/tests/mochitest/treeupdate/test_menu.xul
+++ b/accessible/tests/mochitest/treeupdate/test_menu.xul
@@ -32,7 +32,7 @@
       this.invoke = function openMenu_invoke()
       {
         var tree;
-        if (LINUX || SOLARIS) {
+        if (LINUX) {
           tree =
             { PARENT_MENUITEM: [ ] };
 
@@ -51,7 +51,7 @@
       this.finalCheck = function openMenu_finalCheck()
       {
         var tree;
-        if (LINUX || SOLARIS) {
+        if (LINUX) {
           tree =
             { PARENT_MENUITEM: [
               { MENUITEM: [ ] },
diff --git a/application/basilisk/installer/package-manifest.in b/application/basilisk/installer/package-manifest.in
index 7e12e3a..4ea5040 100644
--- a/application/basilisk/installer/package-manifest.in
+++ b/application/basilisk/installer/package-manifest.in
@@ -709,13 +709,6 @@
 @RESPATH@/components/pipnss.xpt
 @RESPATH@/components/pippki.xpt
 
-; for Solaris SPARC
-#ifdef SOLARIS
-bin/libfreebl_32fpu_3.so
-bin/libfreebl_32int_3.so
-bin/libfreebl_32int64_3.so
-#endif
-
 ; [Updater]
 ;
 #ifdef MOZ_UPDATER
diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in
index 1247d31..d8722bf 100644
--- a/application/palemoon/installer/package-manifest.in
+++ b/application/palemoon/installer/package-manifest.in
@@ -318,13 +318,6 @@
 @RESPATH@/chrome/pippki at JAREXT@
 @RESPATH@/chrome/pippki.manifest
 
-; for Solaris SPARC
-#ifdef SOLARIS
-bin/libfreebl_32fpu_3.so
-bin/libfreebl_32int_3.so
-bin/libfreebl_32int64_3.so
-#endif
-
 ; [Updater]
 ;
 #ifdef MOZ_UPDATER
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
index 98df92e..299a8e8 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -13,10 +13,6 @@
 #include <float.h>
 #endif
 
-#if defined(SOLARIS)
-#include <ieeefp.h>
-#endif
-
 #include "js/TypeDecls.h"
 #include "js/Value.h"
 #include "js/RootingAPI.h"
diff --git a/dom/plugins/base/nsPluginsDirUnix.cpp b/dom/plugins/base/nsPluginsDirUnix.cpp
index 6d112b4..1c7a635 100644
--- a/dom/plugins/base/nsPluginsDirUnix.cpp
+++ b/dom/plugins/base/nsPluginsDirUnix.cpp
@@ -27,8 +27,6 @@
 #elif defined(_AIX)
 #define DEFAULT_X11_PATH "/usr/lib"
 #define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".a"
-#elif defined(SOLARIS)
-#define DEFAULT_X11_PATH "/usr/openwin/lib/"
 #elif defined(LINUX)
 #define DEFAULT_X11_PATH "/usr/X11R6/lib/"
 #elif defined(__APPLE__)
@@ -102,7 +100,7 @@ static bool LoadExtraSharedLib(const char *name, char **soname, bool tryToGetSon
 
 #define PLUGIN_MAX_NUMBER_OF_EXTRA_LIBS 32
 #define PREF_PLUGINS_SONAME "plugin.soname.list"
-#if defined(SOLARIS) || defined(HPUX)
+#if defined(HPUX)
 #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX ":libXm" LOCAL_PLUGIN_DLL_SUFFIX
 #else
 #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX
@@ -280,7 +278,7 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
     // work fine.
 
 
-#if defined(SOLARIS) || defined(HPUX)
+#if defined(HPUX)
     // Acrobat/libXm: Lazy resolving might cause crash later (bug 211587)
     *outLibrary = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW);
     pLibrary = *outLibrary;
diff --git a/gfx/thebes/gfxFontconfigFonts.cpp b/gfx/thebes/gfxFontconfigFonts.cpp
index bbcbbab..9caecc4 100644
--- a/gfx/thebes/gfxFontconfigFonts.cpp
+++ b/gfx/thebes/gfxFontconfigFonts.cpp
@@ -1096,15 +1096,8 @@ gfxFcFontSet::SortPreferredFonts(bool &aWaitForUserFont)
 
     FcFontSet *sets[1] = { fontSet };
     FcResult result;
-#ifdef SOLARIS
-    // Get around a crash of FcFontSetSort when FcConfig is nullptr
-    // Solaris's FcFontSetSort needs an FcConfig (bug 474758)
-    fontSet.own(FcFontSetSort(FcConfigGetCurrent(), sets, 1, mSortPattern,
-                              FcFalse, nullptr, &result));
-#else
     fontSet.own(FcFontSetSort(nullptr, sets, 1, mSortPattern,
                               FcFalse, nullptr, &result));
-#endif
 
     if (truncateMarker != nullptr && fontSet) {
         nsAutoRef<FcFontSet> truncatedSet(FcFontSetCreate());
diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp
index 373b6c9..c896ce5 100644
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -240,11 +240,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp)
     if (!JS_SetProperty(cx, info, "intl-api", value))
         return false;
 
-#if defined(SOLARIS)
-    value = BooleanValue(false);
-#else
     value = BooleanValue(true);
-#endif
     if (!JS_SetProperty(cx, info, "mapped-array-buffer", value))
         return false;
 
diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp
index 0facd00..d6adfac 100644
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -20,10 +20,6 @@
 #include <float.h>
 #endif
 
-#if defined(SOLARIS)
-#include <ieeefp.h>
-#endif
-
 #ifdef HAVE_SSIZE_T
 #include <sys/types.h>
 #endif
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index 26da754..268e1e4 100644
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -17,11 +17,6 @@
 #include "jswin.h"
 #include <psapi.h>
 
-#elif defined(SOLARIS)
-
-#include <sys/mman.h>
-#include <unistd.h>
-
 #elif defined(XP_UNIX)
 
 #include <algorithm>
@@ -408,86 +403,6 @@ DeallocateMappedContent(void* p, size_t length)
 
 #  endif
 
-#elif defined(SOLARIS)
-
-#ifndef MAP_NOSYNC
-# define MAP_NOSYNC 0
-#endif
-
-void
-InitMemorySubsystem()
-{
-    if (pageSize == 0)
-        pageSize = allocGranularity = size_t(sysconf(_SC_PAGESIZE));
-}
-
-void*
-MapAlignedPages(size_t size, size_t alignment)
-{
-    MOZ_ASSERT(size >= alignment);
-    MOZ_ASSERT(size >= allocGranularity);
-    MOZ_ASSERT(size % alignment == 0);
-    MOZ_ASSERT(size % pageSize == 0);
-    MOZ_ASSERT_IF(alignment < allocGranularity, allocGranularity % alignment == 0);
-    MOZ_ASSERT_IF(alignment > allocGranularity, alignment % allocGranularity == 0);
-
-    int prot = PROT_READ | PROT_WRITE;
-    int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC;
-
-    void* p = mmap((caddr_t)alignment, size, prot, flags, -1, 0);
-    if (p == MAP_FAILED)
-        return nullptr;
-    return p;
-}
-
-static void*
-MapAlignedPagesLastDitch(size_t size, size_t alignment)
-{
-    return nullptr;
-}
-
-void
-UnmapPages(void* p, size_t size)
-{
-    MOZ_ALWAYS_TRUE(0 == munmap((caddr_t)p, size));
-}
-
-bool
-MarkPagesUnused(void* p, size_t size)
-{
-    MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0);
-    return true;
-}
-
-bool
-MarkPagesInUse(void* p, size_t size)
-{
-    if (!DecommitEnabled())
-        return;
-
-    MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0);
-}
-
-size_t
-GetPageFaultCount()
-{
-    return 0;
-}
-
-void*
-AllocateMappedContent(int fd, size_t offset, size_t length, size_t alignment)
-{
-    // Not implemented.
-    return nullptr;
-}
-
-// Deallocate mapped memory for object.
-void
-DeallocateMappedContent(void* p, size_t length)
-{
-    // Not implemented.
-}
-
 #elif defined(XP_UNIX)
 
 void
diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp
index 2c5c58a..d203019 100644
--- a/js/src/jsapi-tests/testGCAllocator.cpp
+++ b/js/src/jsapi-tests/testGCAllocator.cpp
@@ -14,8 +14,6 @@
 #if defined(XP_WIN)
 #include "jswin.h"
 #include <psapi.h>
-#elif defined(SOLARIS)
-// This test doesn't apply to Solaris.
 #elif defined(XP_UNIX)
 #include <algorithm>
 #include <errno.h>
@@ -39,8 +37,6 @@ BEGIN_TEST(testGCAllocator)
 #  else // Various APIs are unavailable. This test is disabled.
     return true;
 #  endif
-#elif defined(SOLARIS)
-    return true;
 #elif defined(XP_UNIX)
     PageSize = size_t(sysconf(_SC_PAGESIZE));
 #else
@@ -301,12 +297,6 @@ void* mapMemory(size_t length) { return nullptr; }
 void unmapPages(void* p, size_t size) { }
 
 #  endif
-#elif defined(SOLARIS) // This test doesn't apply to Solaris.
-
-void* mapMemoryAt(void* desired, size_t length) { return nullptr; }
-void* mapMemory(size_t length) { return nullptr; }
-void unmapPages(void* p, size_t size) { }
-
 #elif defined(XP_UNIX)
 
 void*
@@ -377,7 +367,7 @@ unmapPages(void* p, size_t size)
         MOZ_RELEASE_ASSERT(errno == ENOMEM);
 }
 
-#else // !defined(XP_WIN) && !defined(SOLARIS) && !defined(XP_UNIX)
+#else // !defined(XP_WIN) && !defined(XP_UNIX)
 #error "Memory mapping functions are not defined for your OS."
 #endif
 END_TEST(testGCAllocator)
diff --git a/js/src/jsnativestack.cpp b/js/src/jsnativestack.cpp
index 166a5a4..95e0f8d 100644
--- a/js/src/jsnativestack.cpp
+++ b/js/src/jsnativestack.cpp
@@ -71,20 +71,6 @@ js::GetNativeStackBaseImpl()
 # endif
 }
 
-#elif defined(SOLARIS)
-
-#include <ucontext.h>
-
-JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0);
-
-void*
-js::GetNativeStackBaseImpl()
-{
-    stack_t st;
-    stack_getbounds(&st);
-    return static_cast<char*>(st.ss_sp) + st.ss_size;
-}
-
 #elif defined(AIX)
 
 #include <ucontext.h>
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp
index 69e2cc4..87531c1 100644
--- a/js/src/vm/Time.cpp
+++ b/js/src/vm/Time.cpp
@@ -11,9 +11,6 @@
 #include "mozilla/DebugOnly.h"
 #include "mozilla/MathAlgorithms.h"
 
-#ifdef SOLARIS
-#define _REENTRANT 1
-#endif
 #include <string.h>
 #include <time.h>
 
@@ -33,10 +30,6 @@
 
 #ifdef XP_UNIX
 
-#ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
-extern int gettimeofday(struct timeval* tv);
-#endif
-
 #include <sys/time.h>
 
 #endif /* XP_UNIX */
@@ -49,11 +42,7 @@ PRMJ_Now()
 {
     struct timeval tv;
 
-#ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
-    gettimeofday(&tv);
-#else
     gettimeofday(&tv, 0);
-#endif /* _SVID_GETTOD */
 
     return int64_t(tv.tv_sec) * PRMJ_USEC_PER_SEC + int64_t(tv.tv_usec);
 }
diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp
index 78d2136..c4733cc 100644
--- a/js/src/wasm/WasmSignalHandlers.cpp
+++ b/js/src/wasm/WasmSignalHandlers.cpp
@@ -130,7 +130,7 @@ class AutoSetHandlingSegFault
 #  define EPC_sig(p) ((p)->sc_pc)
 #  define RFP_sig(p) ((p)->sc_regs[30])
 # endif
-#elif defined(__linux__) || defined(SOLARIS)
+#elif defined(__linux__)
 # if defined(__linux__)
 #  define XMM_sig(p,i) ((p)->uc_mcontext.fpregs->_xmm[i])
 #  define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP])
diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp
index a643285..a44c143 100644
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -644,7 +644,6 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
                 ObjectOpResult& result)
 {
 /* XXX porting may be easy, but these don't seem to supply setenv by default */
-#if !defined SOLARIS
     RootedString valstr(cx);
     RootedString idstr(cx);
     int rv;
@@ -696,7 +695,6 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
         return false;
     }
     vp.setString(valstr);
-#endif /* !defined SOLARIS */
     return result.succeed();
 }
 
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
index 6bcef02..0840063 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -67,9 +67,6 @@
 #define alloca _alloca
 #endif
 #endif
-#ifdef SOLARIS
-#include <alloca.h>
-#endif
 
 using std::max;
 using std::min;
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
index c0c189a..9a97bbb 100644
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -280,9 +280,7 @@ typedef long ssize_t;
 #define JEMALLOC_RECYCLE
 
 #ifndef MOZ_MEMORY_WINDOWS
-#ifndef MOZ_MEMORY_SOLARIS
 #include <sys/cdefs.h>
-#endif
 #ifndef __DECONST
 #  define __DECONST(type, var)	((type)(uintptr_t)(const void *)(var))
 #endif
@@ -308,7 +306,7 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja
 #endif
 #include <sys/time.h>
 #include <sys/types.h>
-#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID)
+#if !defined(MOZ_MEMORY_ANDROID)
 #include <sys/sysctl.h>
 #endif
 #include <sys/uio.h>
@@ -410,10 +408,6 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
 #endif
 #endif
 
-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
-#define JEMALLOC_USES_MAP_ALIGN	 /* Required on Solaris 10. Might improve performance elsewhere. */
-#endif
-
 #ifndef __DECONST
 #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
 #endif
@@ -1040,7 +1034,7 @@ static const bool config_recycle = false;
  * will abort.
  * Platform specific page size conditions copied from js/public/HeapAPI.h
  */
-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
+#if (defined(__FreeBSD__)) && \
     (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
 #define pagesize_2pow			((size_t) 13)
 #elif defined(__powerpc64__)
@@ -5126,13 +5120,6 @@ malloc_ncpus(void)
 	else
 		return (n);
 }
-#elif (defined(MOZ_MEMORY_SOLARIS))
-
-static inline unsigned
-malloc_ncpus(void)
-{
-	return sysconf(_SC_NPROCESSORS_ONLN);
-}
 #elif (defined(MOZ_MEMORY_WINDOWS))
 static inline unsigned
 malloc_ncpus(void)
@@ -5929,19 +5916,9 @@ RETURN:
 #define MOZ_MEMORY_ELF
 #endif
 
-#ifdef MOZ_MEMORY_SOLARIS
-#  ifdef __SUNPRO_C
-void *
-memalign_impl(size_t alignment, size_t size);
-#pragma no_inline(memalign_impl)
-#  elif (defined(__GNUC__))
-__attribute__((noinline))
-#  endif
-#else
 #if (defined(MOZ_MEMORY_ELF))
 __attribute__((visibility ("hidden")))
 #endif
-#endif
 #endif /* MOZ_REPLACE_MALLOC */
 
 #ifdef MOZ_MEMORY_ELF
diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h
index 760d2c4..5790cf9 100644
--- a/toolkit/mozapps/update/common/updatedefines.h
+++ b/toolkit/mozapps/update/common/updatedefines.h
@@ -96,11 +96,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, ...)
 # include <sys/wait.h>
 # include <unistd.h>
 
-#ifdef SOLARIS
-# include <sys/stat.h>
-#else
 # include <fts.h>
-#endif
 # include <dirent.h>
 
 #ifdef XP_MACOSX
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
index c0b01bf..8025dea 100644
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -3648,88 +3648,6 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
   return rv;
 }
 
-#elif defined(SOLARIS)
-int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
-{
-  int rv = OK;
-  NS_tchar foundpath[MAXPATHLEN];
-  struct {
-    dirent dent_buffer;
-    char chars[MAXNAMLEN];
-  } ent_buf;
-  struct dirent* ent;
-  mozilla::UniquePtr<NS_tchar[]> searchpath(get_full_path(dirpath));
-
-  DIR* dir = opendir(searchpath.get());
-  if (!dir) {
-    LOG(("add_dir_entries error on opendir: " LOG_S ", err: %d", searchpath.get(),
-         errno));
-    return UNEXPECTED_FILE_OPERATION_ERROR;
-  }
-
-  while (readdir_r(dir, (dirent *)&ent_buf, &ent) == 0 && ent) {
-    if ((strcmp(ent->d_name, ".") == 0) ||
-        (strcmp(ent->d_name, "..") == 0))
-      continue;
-
-    NS_tsnprintf(foundpath, sizeof(foundpath)/sizeof(foundpath[0]),
-                 NS_T("%s%s"), searchpath.get(), ent->d_name);
-    struct stat64 st_buf;
-    int test = stat64(foundpath, &st_buf);
-    if (test) {
-      closedir(dir);
-      return UNEXPECTED_FILE_OPERATION_ERROR;
-    }
-    if (S_ISDIR(st_buf.st_mode)) {
-      NS_tsnprintf(foundpath, sizeof(foundpath)/sizeof(foundpath[0]),
-                   NS_T("%s/"), foundpath);
-      // Recurse into the directory.
-      rv = add_dir_entries(foundpath, list);
-      if (rv) {
-        LOG(("add_dir_entries error: " LOG_S ", err: %d", foundpath, rv));
-        closedir(dir);
-        return rv;
-      }
-    } else {
-      // Add the file to be removed to the ActionList.
-      NS_tchar *quotedpath = get_quoted_path(get_relative_path(foundpath));
-      if (!quotedpath) {
-        closedir(dir);
-        return PARSE_ERROR;
-      }
-
-      Action *action = new RemoveFile();
-      rv = action->Parse(quotedpath);
-      if (rv) {
-        LOG(("add_dir_entries Parse error on recurse: " LOG_S ", err: %d",
-             quotedpath, rv));
-        closedir(dir);
-        return rv;
-      }
-
-      list->Append(action);
-    }
-  }
-  closedir(dir);
-
-  // Add the directory to be removed to the ActionList.
-  NS_tchar *quotedpath = get_quoted_path(get_relative_path(dirpath));
-  if (!quotedpath)
-    return PARSE_ERROR;
-
-  Action *action = new RemoveDir();
-  rv = action->Parse(quotedpath);
-  if (rv) {
-    LOG(("add_dir_entries Parse error on close: " LOG_S ", err: %d",
-         quotedpath, rv));
-  }
-  else {
-    list->Append(action);
-  }
-
-  return rv;
-}
-
 #else
 
 int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp
index 098d9ae..454882c 100644
--- a/toolkit/xre/nsSigHandlers.cpp
+++ b/toolkit/xre/nsSigHandlers.cpp
@@ -32,11 +32,6 @@
 #endif
 #endif
 
-#if defined(SOLARIS)
-#include <sys/resource.h>
-#include <ucontext.h>
-#endif
-
 static const char* gProgname = "huh?";
 
 // Note: some tests manipulate this value.
@@ -198,32 +193,6 @@ static void fpehandler(int signum, siginfo_t *si, void *context)
   *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
 #endif
 #endif
-#ifdef SOLARIS
-  ucontext_t *uc = (ucontext_t *)context;
-
-#if defined(__i386)
-  uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0];
-  *cw |= FPU_EXCEPTION_MASK;
-
-  uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1];
-  *sw &= ~FPU_STATUS_FLAGS;
-
-  /* address of the instruction that caused the exception */
-  uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3];
-  uc->uc_mcontext.gregs[REG_PC] = *ip;
-#endif
-#if defined(__amd64__)
-  uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw;
-  *cw |= FPU_EXCEPTION_MASK;
-
-  uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw;
-  *sw &= ~FPU_STATUS_FLAGS;
-
-  uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr;
-  *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
-  *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
-#endif
-#endif
 }
 #endif
 
@@ -286,30 +255,6 @@ void InstallSignalHandlers(const char *aProgname)
   }
 #endif
 
-#if defined(SOLARIS)
-#define NOFILES 512
-
-    // Boost Solaris file descriptors
-    {
-	struct rlimit rl;
-	
-	if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
-
-	    if (rl.rlim_cur < NOFILES) {
-		rl.rlim_cur = NOFILES;
-
-		if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
-		    perror("setrlimit(RLIMIT_NOFILE)");
-		    fprintf(stderr, "Cannot exceed hard limit for open files");
-		}
-#if defined(DEBUG)
-	    	if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
-		    printf("File descriptors set to %d\n", rl.rlim_cur);
-#endif //DEBUG
-	    }
-    }
-#endif //SOLARIS
-
 #if defined(MOZ_WIDGET_GTK) && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6))
   const char *assertString = PR_GetEnv("XPCOM_DEBUG_BREAK");
   if (assertString &&
diff --git a/xpcom/base/nsDebugImpl.cpp b/xpcom/base/nsDebugImpl.cpp
index 96487ac..a81eb3d 100644
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -450,12 +450,6 @@ RealBreak()
     ".object_arch armv4t\n"
 #endif
     "BKPT #0");
-#elif defined(SOLARIS)
-#if defined(__i386__) || defined(__i386) || defined(__x86_64__)
-  asm("int $3");
-#else
-  raise(SIGTRAP);
-#endif
 #else
 #warning do not know how to break on this platform
 #endif
@@ -530,8 +524,6 @@ Break(const char* aMsg)
   RealBreak();
 #elif defined(__arm__)
   RealBreak();
-#elif defined(SOLARIS)
-  RealBreak();
 #else
 #warning do not know how to break on this platform
 #endif
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index bfeda06..88964f9 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -317,85 +317,6 @@ VsizeMaxContiguousDistinguishedAmount(int64_t* aN)
 }
 #endif // FreeBSD
 
-#elif defined(SOLARIS)
-
-#include <procfs.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-static void
-XMappingIter(int64_t& aVsize, int64_t& aResident)
-{
-  aVsize = -1;
-  aResident = -1;
-  int mapfd = open("/proc/self/xmap", O_RDONLY);
-  struct stat st;
-  prxmap_t* prmapp = nullptr;
-  if (mapfd >= 0) {
-    if (!fstat(mapfd, &st)) {
-      int nmap = st.st_size / sizeof(prxmap_t);
-      while (1) {
-        // stat(2) on /proc/<pid>/xmap returns an incorrect value,
-        // prior to the release of Solaris 11.
-        // Here is a workaround for it.
-        nmap *= 2;
-        prmapp = (prxmap_t*)malloc((nmap + 1) * sizeof(prxmap_t));
-        if (!prmapp) {
-          // out of memory
-          break;
-        }
-        int n = pread(mapfd, prmapp, (nmap + 1) * sizeof(prxmap_t), 0);
-        if (n < 0) {
-          break;
-        }
-        if (nmap >= n / sizeof(prxmap_t)) {
-          aVsize = 0;
-          aResident = 0;
-          for (int i = 0; i < n / sizeof(prxmap_t); i++) {
-            aVsize += prmapp[i].pr_size;
-            aResident += prmapp[i].pr_rss * prmapp[i].pr_pagesize;
-          }
-          break;
-        }
-        free(prmapp);
-      }
-      free(prmapp);
-    }
-    close(mapfd);
-  }
-}
-
-#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1
-static MOZ_MUST_USE nsresult
-VsizeDistinguishedAmount(int64_t* aN)
-{
-  int64_t vsize, resident;
-  XMappingIter(vsize, resident);
-  if (vsize == -1) {
-    return NS_ERROR_FAILURE;
-  }
-  *aN = vsize;
-  return NS_OK;
-}
-
-static MOZ_MUST_USE nsresult
-ResidentDistinguishedAmount(int64_t* aN)
-{
-  int64_t vsize, resident;
-  XMappingIter(vsize, resident);
-  if (resident == -1) {
-    return NS_ERROR_FAILURE;
-  }
-  *aN = resident;
-  return NS_OK;
-}
-
-static MOZ_MUST_USE nsresult
-ResidentFastDistinguishedAmount(int64_t* aN)
-{
-  return ResidentDistinguishedAmount(aN);
-}
-
 #elif defined(XP_MACOSX)
 
 #include <mach/mach_init.h>
@@ -1145,13 +1066,9 @@ ResidentPeakDistinguishedAmount(int64_t* aN)
   if (0 == getrusage(RUSAGE_SELF, &usage)) {
     // The units for ru_maxrrs:
     // - Mac: bytes
-    // - Solaris: pages? But some sources it actually always returns 0, so
-    //   check for that
     // - Linux, {Net/Open/Free}BSD, DragonFly: KiB
 #ifdef XP_MACOSX
     *aN = usage.ru_maxrss;
-#elif defined(SOLARIS)
-    *aN = usage.ru_maxrss * getpagesize();
 #else
     *aN = usage.ru_maxrss * 1024;
 #endif
diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h
index b10b814..cbbd386 100644
--- a/xpcom/ds/nsMathUtils.h
+++ b/xpcom/ds/nsMathUtils.h
@@ -11,10 +11,6 @@
 #include <cmath>
 #include <float.h>
 
-#ifdef SOLARIS
-#include <ieeefp.h>
-#endif
-
 /*
  * round
  */
diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
index 194e583..272153b 100644
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -1591,22 +1591,6 @@ nsLocalFile::IsExecutable(bool* aResult)
 
   // Then check the execute bit.
   *aResult = (access(mPath.get(), X_OK) == 0);
-#ifdef SOLARIS
-  // On Solaris, access will always return 0 for root user, however
-  // the file is only executable if S_IXUSR | S_IXGRP | S_IXOTH is set.
-  // See bug 351950, https://bugzilla.mozilla.org/show_bug.cgi?id=351950
-  if (*aResult) {
-    struct STAT buf;
-
-    *aResult = (STAT(mPath.get(), &buf) == 0);
-    if (*aResult || errno == EACCES) {
-      *aResult = *aResult && (buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH));
-      return NS_OK;
-    }
-
-    return NSRESULT_FOR_ERRNO();
-  }
-#endif
   if (*aResult || errno == EACCES) {
     return NS_OK;
   }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list