mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-12 01:43:14 +01:00
Apply BlueZeniX's patch for OpenSolaris compatibility. Fixes #158.
This commit is contained in:
@@ -75,7 +75,7 @@ void _STD_critical_term()
|
||||
|
||||
/* ================================= linux ============================ */
|
||||
|
||||
#if linux || __APPLE__ || __FreeBSD__
|
||||
#if linux || __APPLE__ || __FreeBSD__ || (defined(__SVR4) && defined (__sun))
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -14,9 +14,11 @@ import ldc.cstdarg;
|
||||
version(X86) {
|
||||
version(linux) version=X86_UNWIND;
|
||||
version(darwin) version=X86_UNWIND;
|
||||
version(solaris) version=X86_UNWIND;
|
||||
}
|
||||
version(X86_64) {
|
||||
version(linux) version=X86_UNWIND;
|
||||
version(solaris) version=X86_UNWIND;
|
||||
}
|
||||
|
||||
private extern(C) void abort();
|
||||
|
||||
@@ -73,6 +73,13 @@ private
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
version( solaris ) {
|
||||
version(X86_64) {
|
||||
extern (C) void* _userlimit;
|
||||
}
|
||||
}
|
||||
|
||||
extern (C) void* rt_stackBottom()
|
||||
{
|
||||
version( Win32 )
|
||||
@@ -110,6 +117,16 @@ extern (C) void* rt_stackBottom()
|
||||
// darwin has a fixed stack bottom
|
||||
return cast(void*) 0xc0000000;
|
||||
}
|
||||
else version( solaris )
|
||||
{
|
||||
version(X86_64) {
|
||||
return _userlimit;
|
||||
}
|
||||
else {
|
||||
// <sys/vmparam.h>
|
||||
return cast(void*) 0x8048000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static assert( false, "Operating system not supported." );
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#if _WIN32
|
||||
#elif linux || __APPLE__
|
||||
#elif linux || __APPLE__ || (defined (__SVR4) && defined (__sun))
|
||||
#define USE_PTHREADS 1
|
||||
#else
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user