How to implement qsort_r

Eric Blake eblake@redhat.com
Thu Dec 4 16:38:00 GMT 2014


On 12/04/2014 07:37 AM, Eric Blake wrote:
> On 12/04/2014 01:28 AM, Corinna Vinschen wrote:
>> The implementation is pretty simple either way, so, yes, we could
>> implement both and let the header provide both as well along the lines
>> of strerror_r.
>>
>> Alternatively, are there any known efforts to standarize the API?
>> Eric, any word from the Austin group in terms of qsort_r?
> 
> No one has asked about it before; I can ask, but suspect that since
> there is a difference in existing implementation, it would be easier for
> POSIX to standardize a different function name than qsort_r than to pick
> sides on which signature to standardize.
> 
> My personal preference is the glibc style (the opaque argument last in
> both qsort_r and the comparator), not the BSD style (the opaque argument
> first in both calls),  This is because POSIX already has other
> standardized functions in the glibc style (pthread_cleanup_push,
> pthread_create), and none in the BSD styloe.

Issue created; it may take several weeks before it gets discussed:
http://austingroupbugs.net/view.php?id=900

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20141204/aa6294a5/attachment.sig>


More information about the Newlib mailing list