Commit 71043642 by Iain Buclaw

libphobos: Merge upstream phobos 66ae77ac3

Finishes off phobos support for musl targets.

Reviewed-on: https://github.com/dlang/phobos/pull/7108

From-SVN: r274770
parent 7cc9cfd2
3dc363783ea7b1e82336983486a14f3f44bbeadd 66ae77ac3f97a007a12738e4bc02b3bbfef99bba
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the dlang/phobos repository. merge done from the dlang/phobos repository.
...@@ -580,6 +580,12 @@ struct InSituRegion(size_t size, size_t minAlign = platformAlignment) ...@@ -580,6 +580,12 @@ struct InSituRegion(size_t size, size_t minAlign = platformAlignment)
assert(a.length == 2001); assert(a.length == 2001);
} }
version(CRuntime_Musl)
{
// sbrk and brk are disabled in Musl:
// https://git.musl-libc.org/cgit/musl/commit/?id=7a995fe706e519a4f55399776ef0df9596101f93
// https://git.musl-libc.org/cgit/musl/commit/?id=863d628d93ea341b6a32661a1654320ce69f6a07
} else:
private extern(C) void* sbrk(long); private extern(C) void* sbrk(long);
private extern(C) int brk(shared void*); private extern(C) int brk(shared void*);
......
...@@ -163,47 +163,7 @@ string formatSocketError(int err) @trusted ...@@ -163,47 +163,7 @@ string formatSocketError(int err) @trusted
{ {
cs = strerror_r(err, buf.ptr, buf.length); cs = strerror_r(err, buf.ptr, buf.length);
} }
else version (OSX) else
{
auto errs = strerror_r(err, buf.ptr, buf.length);
if (errs == 0)
cs = buf.ptr;
else
return "Socket error " ~ to!string(err);
}
else version (FreeBSD)
{
auto errs = strerror_r(err, buf.ptr, buf.length);
if (errs == 0)
cs = buf.ptr;
else
return "Socket error " ~ to!string(err);
}
else version (NetBSD)
{
auto errs = strerror_r(err, buf.ptr, buf.length);
if (errs == 0)
cs = buf.ptr;
else
return "Socket error " ~ to!string(err);
}
else version (DragonFlyBSD)
{
auto errs = strerror_r(err, buf.ptr, buf.length);
if (errs == 0)
cs = buf.ptr;
else
return "Socket error " ~ to!string(err);
}
else version (Solaris)
{
auto errs = strerror_r(err, buf.ptr, buf.length);
if (errs == 0)
cs = buf.ptr;
else
return "Socket error " ~ to!string(err);
}
else version (CRuntime_Bionic)
{ {
auto errs = strerror_r(err, buf.ptr, buf.length); auto errs = strerror_r(err, buf.ptr, buf.length);
if (errs == 0) if (errs == 0)
...@@ -211,8 +171,6 @@ string formatSocketError(int err) @trusted ...@@ -211,8 +171,6 @@ string formatSocketError(int err) @trusted
else else
return "Socket error " ~ to!string(err); return "Socket error " ~ to!string(err);
} }
else
static assert(0);
auto len = strlen(cs); auto len = strlen(cs);
......
...@@ -44,38 +44,38 @@ version (CRuntime_Glibc) ...@@ -44,38 +44,38 @@ version (CRuntime_Glibc)
version = GCC_IO; version = GCC_IO;
version = HAS_GETDELIM; version = HAS_GETDELIM;
} }
else version (CRuntime_Bionic)
version (OSX)
{ {
version = GENERIC_IO; version = GENERIC_IO;
version = HAS_GETDELIM; version = HAS_GETDELIM;
} }
else version (CRuntime_Musl)
version (FreeBSD)
{ {
version = GENERIC_IO; version = GENERIC_IO;
version = HAS_GETDELIM; version = HAS_GETDELIM;
} }
version (NetBSD) version (OSX)
{ {
version = GENERIC_IO; version = GENERIC_IO;
version = HAS_GETDELIM; version = HAS_GETDELIM;
} }
else version (FreeBSD)
version (DragonFlyBSD)
{ {
version = GENERIC_IO; version = GENERIC_IO;
version = HAS_GETDELIM; version = HAS_GETDELIM;
} }
else version (NetBSD)
version (Solaris)
{ {
version = GENERIC_IO; version = GENERIC_IO;
version = NO_GETDELIM; version = HAS_GETDELIM;
} }
else version (DragonFlyBSD)
version (CRuntime_Bionic) {
version = GENERIC_IO;
version = HAS_GETDELIM;
}
else version (Solaris)
{ {
version = GENERIC_IO; version = GENERIC_IO;
version = NO_GETDELIM; version = NO_GETDELIM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment