summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-01 13:55:00 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-01 13:55:00 -0400
commitce3979c721ba378a448bfbe3671c99d993cbc801 (patch)
treee200d5225bcecef5f974b946a58277fddd24e89c /js
parentf6c16cff36048c583ca0e1d019b622336ca861a0 (diff)
parentff2f287f82630ab3887d7d5c1e64e5b888ea0beb (diff)
downloadUXP-ce3979c721ba378a448bfbe3671c99d993cbc801.tar
UXP-ce3979c721ba378a448bfbe3671c99d993cbc801.tar.gz
UXP-ce3979c721ba378a448bfbe3671c99d993cbc801.tar.lz
UXP-ce3979c721ba378a448bfbe3671c99d993cbc801.tar.xz
UXP-ce3979c721ba378a448bfbe3671c99d993cbc801.zip
Merge branch 'master' into Sync-weave
Diffstat (limited to 'js')
-rw-r--r--js/public/LegacyIntTypes.h10
-rw-r--r--js/src/Makefile.in21
-rw-r--r--js/src/builtin/TestingFunctions.cpp4
-rw-r--r--js/src/ctypes/CTypes.cpp4
-rw-r--r--js/src/ctypes/libffi/testsuite/libffi.call/float2.c10
-rw-r--r--js/src/gc/Memory.cpp85
-rw-r--r--js/src/jsapi-tests/testGCAllocator.cpp12
-rw-r--r--js/src/jsnativestack.cpp29
-rw-r--r--js/src/jstypes.h8
-rw-r--r--js/src/moz.build8
-rw-r--r--js/src/vm/Time.cpp11
-rw-r--r--js/src/wasm/WasmSignalHandlers.cpp2
-rw-r--r--js/xpconnect/src/XPCShellImpl.cpp13
13 files changed, 4 insertions, 213 deletions
diff --git a/js/public/LegacyIntTypes.h b/js/public/LegacyIntTypes.h
index 2c8498c89..cdfd98726 100644
--- a/js/public/LegacyIntTypes.h
+++ b/js/public/LegacyIntTypes.h
@@ -31,20 +31,10 @@ typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;
-/*
- * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h, a very
- * common header file) defines the types int8, int16, int32, and int64.
- * So we don't define these four types here to avoid conflicts in case
- * the code also includes sys/types.h.
- */
-#if defined(AIX) && defined(HAVE_SYS_INTTYPES_H)
-#include <sys/inttypes.h>
-#else
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;
typedef int64_t int64;
-#endif /* AIX && HAVE_SYS_INTTYPES_H */
typedef uint8_t JSUint8;
typedef uint16_t JSUint16;
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
index b007954b1..20678c68c 100644
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -138,27 +138,6 @@ distclean::
CFLAGS += $(MOZ_ZLIB_CFLAGS)
-# Silence warnings on AIX/HP-UX from non-GNU compilers
-ifndef GNU_CC
-ifeq ($(OS_ARCH),AIX)
-# Suppress warnings from xlC
-# 1540-1281: offsetof() on null non-POD types
-# 1540-1608: anonymous unions using static data members
-CFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608
-CXXFLAGS += -qsuppress=1540-1281 -qsuppress=1540-1608
-endif
-endif
-ifeq ($(OS_ARCH),SunOS)
-ifeq ($(TARGET_CPU),sparc)
-
-ifdef GNU_CC
-CFLAGS += -mcpu=v9
-CXXFLAGS += -mcpu=v9
-endif # GNU_CC
-
-endif
-endif
-
$(LIBRARY_NAME).pc: js.pc
cp $^ $@
diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp
index 373b6c9ed..c896ce5d1 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 0facd0009..d6adfac2c 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/ctypes/libffi/testsuite/libffi.call/float2.c b/js/src/ctypes/libffi/testsuite/libffi.call/float2.c
index a0b296cf4..dfdef0598 100644
--- a/js/src/ctypes/libffi/testsuite/libffi.call/float2.c
+++ b/js/src/ctypes/libffi/testsuite/libffi.call/float2.c
@@ -32,21 +32,11 @@ int main (void)
f = 3.14159;
-#if 1
- /* This is ifdef'd out for now. long double support under SunOS/gcc
- is pretty much non-existent. You'll get the odd bus error in library
- routines like printf(). */
printf ("%Lf\n", ldblit(f));
-#endif
ld = 666;
ffi_call(&cif, FFI_FN(ldblit), &ld, values);
-#if 1
- /* This is ifdef'd out for now. long double support under SunOS/gcc
- is pretty much non-existent. You'll get the odd bus error in library
- routines like printf(). */
printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON);
-#endif
/* These are not always the same!! Check for a reasonable delta */
if (ld - ldblit(f) < LDBL_EPSILON)
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index 26da75469..268e1e489 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 2c5c58a29..d203019ec 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 166a5a4f7..98f8fc741 100644
--- a/js/src/jsnativestack.cpp
+++ b/js/src/jsnativestack.cpp
@@ -71,35 +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>
-
-JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0);
-
-void*
-js::GetNativeStackBaseImpl()
-{
- ucontext_t context;
- getcontext(&context);
- return static_cast<char*>(context.uc_stack.ss_sp) +
- context.uc_stack.ss_size;
-}
-
#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__)
void*
js::GetNativeStackBaseImpl()
diff --git a/js/src/jstypes.h b/js/src/jstypes.h
index 75774e5b8..6cfb3d4ad 100644
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -147,13 +147,7 @@
# define JS_64BIT
# endif
#elif defined(__GNUC__)
-/* Additional GCC defines are when running on Solaris, AIX, and HPUX */
-# if defined(__x86_64__) || defined(__sparcv9) || \
- defined(__64BIT__) || defined(__LP64__)
-# define JS_64BIT
-# endif
-#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Sun Studio C/C++ */
-# if defined(__x86_64) || defined(__sparcv9)
+# if defined(__x86_64__) || defined(__64BIT__)
# define JS_64BIT
# endif
#elif defined(__xlc__) || defined(__xlC__) /* IBM XL C/C++ */
diff --git a/js/src/moz.build b/js/src/moz.build
index a3283b5d6..888741138 100644
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -722,14 +722,6 @@ if CONFIG['OS_ARCH'] == 'Linux':
'dl',
]
-if CONFIG['OS_ARCH'] == 'SunOS':
- OS_LIBS += [
- 'posix4',
- 'dl',
- 'nsl',
- 'socket',
- ]
-
OS_LIBS += CONFIG['REALTIME_LIBS']
CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp
index 69e2cc41d..87531c148 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 78d21369d..c4733cc96 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 a6432856d..4ddc8deb3 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;
@@ -663,7 +662,7 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
JSAutoByteString value(cx, valstr);
if (!value)
return false;
-#if defined XP_WIN || defined HPUX || defined OSF1 || defined SCO
+#if defined XP_WIN || defined SCO
{
char* waste = JS_smprintf("%s=%s", name.ptr(), value.ptr());
if (!waste) {
@@ -671,16 +670,7 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
return false;
}
rv = putenv(waste);
-#ifdef XP_WIN
- /*
- * HPUX9 at least still has the bad old non-copying putenv.
- *
- * Per mail from <s.shanmuganathan@digital.com>, OSF1 also has a putenv
- * that will crash if you pass it an auto char array (so it must place
- * its argument directly in the char* environ[] array).
- */
free(waste);
-#endif
}
#else
rv = setenv(name.ptr(), value.ptr(), 1);
@@ -696,7 +686,6 @@ env_setProperty(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue
return false;
}
vp.setString(valstr);
-#endif /* !defined SOLARIS */
return result.succeed();
}