mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Issue #187: Remove solaris conditional code.
This commit is contained in:
parent
471c65b924
commit
78d61fd2b1
26 changed files with 12 additions and 448 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,6 @@
|
|||
#include <float.h>
|
||||
#endif
|
||||
|
||||
#if defined(SOLARIS)
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SSIZE_T
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue