]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libphobos: Merge upstream phobos 66ae77ac3
authoribuclaw <ibuclaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Aug 2019 07:53:55 +0000 (07:53 +0000)
committeribuclaw <ibuclaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Aug 2019 07:53:55 +0000 (07:53 +0000)
Finishes off phobos support for musl targets.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274770 138bc75d-0d04-0410-961f-82ee72b054a4

libphobos/src/MERGE
libphobos/src/std/experimental/allocator/building_blocks/region.d
libphobos/src/std/socket.d
libphobos/src/std/stdio.d

index cfac5c66b4ecc0c22fe6772fe1611e86a4d0d1ee..6a1e00874bb606fb30d2487d9f5fabf2b50d04b2 100644 (file)
@@ -1,4 +1,4 @@
-3dc363783ea7b1e82336983486a14f3f44bbeadd
+66ae77ac3f97a007a12738e4bc02b3bbfef99bba
 
 The first line of this file holds the git revision number of the last
 merge done from the dlang/phobos repository.
index 43dfdb788e5e5e33efd79fc4247a24e0053da497..835d0937cec2e0b9f24e8c92ba9798ee5c5d4f3d 100644 (file)
@@ -580,6 +580,12 @@ struct InSituRegion(size_t size, size_t minAlign = platformAlignment)
     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) int brk(shared void*);
 
index 2853dbde0c62f5960bd5338c742681beebad60bb..a4ba39c833630abcfb7cb603b65df98dc46ba7e4 100644 (file)
@@ -163,47 +163,7 @@ string formatSocketError(int err) @trusted
         {
             cs = strerror_r(err, buf.ptr, buf.length);
         }
-        else version (OSX)
-        {
-            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)
+        else
         {
             auto errs = strerror_r(err, buf.ptr, buf.length);
             if (errs == 0)
@@ -211,8 +171,6 @@ string formatSocketError(int err) @trusted
             else
                 return "Socket error " ~ to!string(err);
         }
-        else
-            static assert(0);
 
         auto len = strlen(cs);
 
index 63bc32e9694642f67afc1b6fd2cff293b8972818..4c1ad0baa153efb9d5238538e43fcc99a5cbeac8 100644 (file)
@@ -44,38 +44,38 @@ version (CRuntime_Glibc)
     version = GCC_IO;
     version = HAS_GETDELIM;
 }
-
-version (OSX)
+else version (CRuntime_Bionic)
 {
     version = GENERIC_IO;
     version = HAS_GETDELIM;
 }
-
-version (FreeBSD)
+else version (CRuntime_Musl)
 {
     version = GENERIC_IO;
     version = HAS_GETDELIM;
 }
 
-version (NetBSD)
+version (OSX)
 {
     version = GENERIC_IO;
     version = HAS_GETDELIM;
 }
-
-version (DragonFlyBSD)
+else version (FreeBSD)
 {
     version = GENERIC_IO;
     version = HAS_GETDELIM;
 }
-
-version (Solaris)
+else version (NetBSD)
 {
     version = GENERIC_IO;
-    version = NO_GETDELIM;
+    version = HAS_GETDELIM;
 }
-
-version (CRuntime_Bionic)
+else version (DragonFlyBSD)
+{
+    version = GENERIC_IO;
+    version = HAS_GETDELIM;
+}
+else version (Solaris)
 {
     version = GENERIC_IO;
     version = NO_GETDELIM;