Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions std/experimental/allocator/mallocator.d
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ struct Mallocator
test!Mallocator();
}

version (Posix)
@nogc nothrow
private extern(C) int posix_memalign(void**, size_t, size_t);

version (Windows)
{
// DMD Win 32 bit, DigitalMars C standard library misses the _aligned_xxx
Expand Down Expand Up @@ -231,6 +227,7 @@ struct AlignedMallocator
void[] alignedAllocate(size_t bytes, uint a) shared
{
import core.stdc.errno : ENOMEM, EINVAL;
import core.sys.posix.stdlib : posix_memalign;
assert(a.isGoodDynamicAlignment);
void* result;
auto code = posix_memalign(&result, a, bytes);
Expand Down
5 changes: 0 additions & 5 deletions std/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -4293,11 +4293,6 @@ string tempDir() @trusted
DWORD len = GetTempPathW(buf.length, buf.ptr);
if (len) cache = buf[0 .. len].to!string;
}
else version (Android)
{
// Don't check for a global temporary directory as
// Android doesn't have one.
}
else version (Posix)
{
import std.process : environment;
Expand Down
34 changes: 17 additions & 17 deletions std/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -5055,6 +5055,21 @@ struct FloatingPointControl
| inexactException | subnormalException,
}
}
else version (PPC_Any)
{
enum : ExceptionMask
{
inexactException = 0x0008,
divByZeroException = 0x0010,
underflowException = 0x0020,
overflowException = 0x0040,
invalidException = 0x0080,
severeExceptions = overflowException | divByZeroException
| invalidException,
allExceptions = severeExceptions | underflowException
| inexactException,
}
}
else version (HPPA)
{
enum : ExceptionMask
Expand All @@ -5075,31 +5090,16 @@ struct FloatingPointControl
enum : ExceptionMask
{
inexactException = 0x0080,
underflowException = 0x0100,
overflowException = 0x0200,
divByZeroException = 0x0400,
overflowException = 0x0200,
underflowException = 0x0100,
invalidException = 0x0800,
severeExceptions = overflowException | divByZeroException
| invalidException,
allExceptions = severeExceptions | underflowException
| inexactException,
}
}
else version (PPC_Any)
{
enum : ExceptionMask
{
inexactException = 0x08,
divByZeroException = 0x10,
underflowException = 0x20,
overflowException = 0x40,
invalidException = 0x80,
severeExceptions = overflowException | divByZeroException
| invalidException,
allExceptions = severeExceptions | underflowException
| inexactException,
}
}
else version (SPARC_Any)
{
enum : ExceptionMask
Expand Down
4 changes: 3 additions & 1 deletion std/system.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ immutable
{
win32 = 1, /// Microsoft 32 bit Windows systems
win64, /// Microsoft 64 bit Windows systems
linux, /// All Linux Systems
linux, /// All Linux Systems, except for Android
osx, /// Mac OS X
freeBSD, /// FreeBSD
netBSD, /// NetBSD
dragonFlyBSD, /// DragonFlyBSD
solaris, /// Solaris
android, /// Android
otherPosix /// Other Posix Systems
Expand All @@ -45,6 +46,7 @@ immutable
else version (OSX) OS os = OS.osx;
else version (FreeBSD) OS os = OS.freeBSD;
else version (NetBSD) OS os = OS.netBSD;
else version (DragonFlyBSD) OS os = OS.dragonFlyBSD;
else version (Posix) OS os = OS.otherPosix;
else static assert(0, "Unknown OS.");

Expand Down