Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Add Solaris support for C fenv interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbking committed Jul 17, 2014
1 parent e3074a4 commit ae4fb72
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/core/stdc/fenv.d
Expand Up @@ -170,6 +170,26 @@ else version( Android )
static assert(false, "Architecture not supported.");
}
}
else version( Solaris )
{
import core.stdc.config : c_ulong;

enum FEX_NUM_EXC = 12;

struct fex_handler_t
{
int __mode;
void function() __handler;
}

struct fenv_t
{
fex_handler_t[FEX_NUM_EXC] __handler;
c_ulong __fsr;
}

alias int fexcept_t;
}
else
{
static assert( false, "Unsupported platform" );
Expand Down Expand Up @@ -214,6 +234,11 @@ else version( Android )
private extern const fenv_t __fe_dfl_env;
const fenv_t* FE_DFL_ENV = &__fe_dfl_env;
}
else version( Solaris )
{
private extern const fenv_t __fenv_def_env;
const fenv_t* FE_DFL_ENV = &__fenv_def_env;
}
else
{
static assert( false, "Unsupported platform" );
Expand Down

0 comments on commit ae4fb72

Please sign in to comment.