Apply BlueZeniX's patch for OpenSolaris compatibility. Fixes #158.

This commit is contained in:
Christian Kamm
2009-01-04 15:49:28 +01:00
parent 955df981f8
commit e7f750aee1
12 changed files with 57 additions and 4 deletions

View File

@@ -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>

View File

@@ -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();

View File

@@ -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." );

View File

@@ -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