From 7fde88d38c8caf37dc4c3ef88ac92188b86ad291 Mon Sep 17 00:00:00 2001 From: Joakim Date: Wed, 3 May 2017 13:40:36 +0530 Subject: [PATCH 1/4] Use posix_memalign declaration from druntime instead --- std/experimental/allocator/mallocator.d | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/std/experimental/allocator/mallocator.d b/std/experimental/allocator/mallocator.d index 4266ea96e89..862a831c8ee 100644 --- a/std/experimental/allocator/mallocator.d +++ b/std/experimental/allocator/mallocator.d @@ -103,10 +103,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 @@ -229,6 +225,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); From 008064792ccbd03c7762769a9a25702679ff5867 Mon Sep 17 00:00:00 2001 From: Joakim Date: Sun, 21 May 2017 16:35:29 +0530 Subject: [PATCH 2/4] Don't run HardFloat tests on SoftFloat systems, like ARM_SoftFloat. --- std/math.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/std/math.d b/std/math.d index b029c50d375..8db6acbb906 100644 --- a/std/math.d +++ b/std/math.d @@ -4816,7 +4816,7 @@ public: assert(ieeeFlags == f); } -@system unittest +version(D_HardFloat) @system unittest { import std.meta : AliasSeq; @@ -5260,7 +5260,7 @@ private: ensureDefaults(); } -@system unittest // rounding +version(D_HardFloat) @system unittest // rounding { import std.meta : AliasSeq; From ee4036a53a81ad9df2ac79fe8b00b889a4327d1f Mon Sep 17 00:00:00 2001 From: Joakim Date: Sat, 16 Sep 2017 12:56:33 +0530 Subject: [PATCH 3/4] Use the Posix TMPDIR logic, as D can be used from the command-line too on Android. --- std/file.d | 5 ----- 1 file changed, 5 deletions(-) diff --git a/std/file.d b/std/file.d index fc0f15b6f70..e8e434c06ca 100644 --- a/std/file.d +++ b/std/file.d @@ -4353,11 +4353,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; From f2186efb3fab8d2280e4531ef97bd5fad9ef7a79 Mon Sep 17 00:00:00 2001 From: Joakim Date: Fri, 22 Dec 2017 16:13:52 +0530 Subject: [PATCH 4/4] std.system: Add comment fix for Android --- std/system.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/system.d b/std/system.d index dbc0f846986..2320ff09b20 100644 --- a/std/system.d +++ b/std/system.d @@ -28,7 +28,7 @@ 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