Remove ECSEmscripten as Emscripten version is now supported in LDC (+fix compile scripts)
This commit is contained in:
parent
d77317c816
commit
f19bce1a57
5 changed files with 15 additions and 140 deletions
|
|
@ -7,11 +7,9 @@ License: BSD 3-clause, see LICENSE file in project root folder.
|
|||
*/
|
||||
module bubel.ecs.std;
|
||||
|
||||
version (Emscripten) version = ECSEmscripten;
|
||||
|
||||
import std.traits;
|
||||
|
||||
version (ECSEmscripten)
|
||||
version (Emscripten)
|
||||
{
|
||||
extern (C) struct pthread_mutex_t
|
||||
{
|
||||
|
|
@ -29,10 +27,6 @@ version (ECSEmscripten)
|
|||
|
||||
extern (C) int memcmp(const void* s1, const void* s2, size_t size);
|
||||
extern (C) void exit(int status) nothrow @nogc;
|
||||
extern (C) void __assert(const(char)* msg, const(char)* file, uint line)
|
||||
{
|
||||
exit(-20);
|
||||
}
|
||||
|
||||
extern (C) void free(void*) @nogc nothrow @system;
|
||||
extern (C) void* malloc(size_t size) @nogc nothrow @system;
|
||||
|
|
@ -60,7 +54,7 @@ else
|
|||
public import core.stdc.stdlib : qsort;
|
||||
}
|
||||
|
||||
version (ECSEmscripten)
|
||||
version (Emscripten)
|
||||
{
|
||||
}
|
||||
else version (Windows)
|
||||
|
|
@ -89,7 +83,7 @@ else version (Posix)
|
|||
import core.sys.posix.stdlib : posix_memalign;
|
||||
}
|
||||
|
||||
version (ECSEmscripten)
|
||||
version (Emscripten)
|
||||
{
|
||||
private const uint max_alloca = 10000;
|
||||
private __gshared byte[max_alloca] alloca_array;
|
||||
|
|
@ -294,7 +288,7 @@ static struct Mallocator
|
|||
posix_memalign(&ret, alignment, length); //ret = aligned_alloc(alignment, length);
|
||||
else version (Windows)
|
||||
ret = _aligned_malloc(length, alignment);
|
||||
else version (ECSEmscripten)
|
||||
else version (Emscripten)
|
||||
posix_memalign(&ret, alignment, length); //malloc(length);
|
||||
else
|
||||
static assert(0, "Unimplemented platform!");
|
||||
|
|
@ -341,7 +335,7 @@ static struct Mallocator
|
|||
free(cast(void*) object);
|
||||
else version (Windows)
|
||||
_aligned_free(cast(void*) object);
|
||||
else version (ECSEmscripten)
|
||||
else version (Emscripten)
|
||||
free(cast(void*) object);
|
||||
else
|
||||
static assert(0, "Unimplemented platform!");
|
||||
|
|
@ -351,7 +345,7 @@ static struct Mallocator
|
|||
struct Mutex
|
||||
{
|
||||
|
||||
version (ECSEmscripten)
|
||||
version (Emscripten)
|
||||
{
|
||||
void initialize() nothrow @nogc
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue