www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11520] New: [bionic] qsort is missing on linux/bionic

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11520

           Summary: [bionic] qsort is missing on linux/bionic
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu



Druntime could easily implement it's own qsort.

https://github.com/ldc-developers/ldc/issues/490#issuecomment-28356710

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 15 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11520




An existing (though copyrighted) implementation was removed with
https://github.com/D-Programming-Language/druntime/commit/45f1755cf13a1a376cc1572b5a9327d95fc0db75.
Also the used qsort_r isn't present in older glibc versions (see bug 10508).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 16 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11520


joakim airpost.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joakim airpost.net



There is a qsort in bionic, looks like it comes from FreeBSD:

https://github.com/android/platform_bionic/blob/master/libc/include/stdlib.h#L91
https://github.com/android/platform_bionic/blob/master/libc/upstream-freebsd/lib/libc/stdlib/qsort.c#L110

There is no qsort_r, which is what Druntime uses on linux by default: my guess
is that's what Elvis tried to use.  But you can use the fallback block from
rt/qsort.d that calls qsort on Android and I believe it should work fine.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 05 2014