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

Commit

Permalink
Fix FP_ILOGB constants for GlibC and non-X86
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Aug 12, 2016
1 parent 184b68e commit 0745846
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions src/core/stdc/math.d
Expand Up @@ -67,6 +67,62 @@ else version (CRuntime_Bionic)
///
enum int FP_ILOGBNAN = int.max;
}
else version (CRuntime_Glibc)
{
version (X86)
{
///
enum int FP_ILOGB0 = int.min;
///
enum int FP_ILOGBNAN = int.min;
}
else version (X86_64)
{
///
enum int FP_ILOGB0 = int.min;
///
enum int FP_ILOGBNAN = int.min;
}
else version (ARM)
{
///
enum int FP_ILOGB0 = -2147483647;
///
enum int FP_ILOGBNAN = 2147483647;
}
else version (AArch64)
{
///
enum int FP_ILOGB0 = -2147483647;
///
enum int FP_ILOGBNAN = 2147483647;
}
else version (MIPS64)
{
///
enum int FP_ILOGB0 = -2147483647;
///
enum int FP_ILOGBNAN = 2147483647;
}
else version (PPC)
{
///
enum int FP_ILOGB0 = -2147483647;
///
enum int FP_ILOGBNAN = 2147483647;
}
else version (PPC64)
{
///
enum int FP_ILOGB0 = -2147483647;
///
enum int FP_ILOGBNAN = 2147483647;
}
else
{
static assert(false, "Architecture not supported.");
}
}
else
{
///
Expand Down

0 comments on commit 0745846

Please sign in to comment.