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

Commit

Permalink
Added RAND_MAX for Solaris and messages for static asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
complexmath committed Feb 4, 2011
1 parent a9f890e commit 5403b3d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/core/stdc/fenv.d
Expand Up @@ -84,7 +84,7 @@ else version ( FreeBSD )
}
else
{
static assert( false );
static assert( false, "Unsupported platform" );
}

enum
Expand Down Expand Up @@ -123,7 +123,7 @@ else version( FreeBSD )
}
else
{
static assert( false );
static assert( false, "Unsupported platform" );
}

void feraiseexcept(int excepts);
Expand Down
8 changes: 4 additions & 4 deletions src/core/stdc/stdarg.d
Expand Up @@ -225,12 +225,12 @@ else version (X86_64)
}
else
{
static assert(0);
static assert(false);
}
}
else
{
static assert(0, "not a valid argument type for va_arg");
static assert(false, "not a valid argument type for va_arg");
}
}

Expand Down Expand Up @@ -320,7 +320,7 @@ else version (X86_64)
}
else
{
assert(0, "not a valid argument type for va_arg");
assert(false, "not a valid argument type for va_arg");
}
}

Expand All @@ -335,5 +335,5 @@ else version (X86_64)
}
else
{
static assert(0, "Unsupported platform");
static assert(false, "Unsupported platform");
}
8 changes: 4 additions & 4 deletions src/core/stdc/stdio.d
Expand Up @@ -110,7 +110,7 @@ else version ( FreeBSD )
}
else
{
static assert( false );
static assert( false, "Unsupported platform" );
}

enum
Expand Down Expand Up @@ -221,7 +221,7 @@ struct _iobuf
}
else
{
static assert( false );
static assert( false, "Unsupported platform" );
}
}

Expand Down Expand Up @@ -319,7 +319,7 @@ else version( FreeBSD )
}
else
{
static assert( false );
static assert( false, "Unsupported platform" );
}

alias int fpos_t;
Expand Down Expand Up @@ -428,7 +428,7 @@ else version( FreeBSD )
}
else
{
static assert( false );
static assert( false, "Unsupported platform" );
}

void perror(in char* s);
8 changes: 6 additions & 2 deletions src/core/stdc/stdlib.d
Expand Up @@ -42,8 +42,12 @@ enum EXIT_SUCCESS = 0;
enum EXIT_FAILURE = 1;
enum MB_CUR_MAX = 1;

version(Windows) enum RAND_MAX = 0x7fff;
else version(Posix) enum RAND_MAX = 0x7fffffff;
version(Windows) enum RAND_MAX = 0x7fff;
else version(linux) enum RAND_MAX = 0x7fffffff;
else version(OSX) enum RAND_MAX = 0x7fffffff;
else version(FreeBSD) enum RAND_MAX = 0x7fffffff;
else version(Solaris) enum RAND_MAX = 0x7fff;
else static assert( false, "Unsupported platform" );

double atof(in char* nptr);
int atoi(in char* nptr);
Expand Down

0 comments on commit 5403b3d

Please sign in to comment.