Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/stdlib/qsort_r.c
- This file was copied to lib/libc/stdlib/qsort_r_compat.c.
/* | /* | ||||
* This file is in the public domain. Originally written by Garrett | * This file is in the public domain. Originally written by Garrett | ||||
* A. Wollman. | * A. Wollman. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#include "block_abi.h" | |||||
#define I_AM_QSORT_R | #define I_AM_QSORT_R | ||||
#include "qsort.c" | #include "qsort.c" | ||||
typedef DECLARE_BLOCK(int, qsort_block, const void *, const void *); | |||||
void | |||||
qsort_b(void *base, size_t nel, size_t width, qsort_block compar) | |||||
cem: Is qsort_b no longer needed? What's this change for? | |||||
Done Inline Actions@cem It looks like it was moved and therefore no longer needed in this file (it's in qsort_r_compat.c, and qsort_b was implemented with the new __qsort_r_compat rountine, and qsort_b API was not changed). Because the prototype difference of the compare function, it can not be implemented with the new qsort_r API. I think we should have a new qsort_b API (the inconsistency with qsort_r would be confusing for developers), but this change will not prevent us from doing it in the future, should we choose to fix it and can be taken care of at a later time. delphij: @cem It looks like it was moved and therefore no longer needed in this file (it's in… | |||||
{ | |||||
qsort_r(base, nel, width, compar, | |||||
(int (*)(void *, const void *, const void *)) | |||||
GET_BLOCK_FUNCTION(compar)); | |||||
} |
Is qsort_b no longer needed? What's this change for?