Am 12.12.2016 um 20:57 schrieb Jeff King:
On Mon, Dec 12, 2016 at 08:51:14PM +0100, René Scharfe wrote:
It's kinda cool to have a bespoke compatibility layer for major platforms,
but the more I think about it the less I can answer why we would want that.
Safety, reliability and performance
On Mon, Dec 12, 2016 at 08:51:14PM +0100, René Scharfe wrote:
> It's kinda cool to have a bespoke compatibility layer for major platforms,
> but the more I think about it the less I can answer why we would want that.
> Safety, reliability and performance can't be good reasons -- if our fallback
>
Am 01.12.2016 um 21:22 schrieb Junio C Hamano:
Junio C Hamano writes:
Eh, wait. BSD and Microsoft have paramters reordered in the
callback comparison function. I suspect that would not fly very
well.
Hmm. We could do it like this, which may not be too bad.
It's kinda
René Scharfe writes:
>> You can hack around it by passing a wrapper callback that flips the
>> arguments. Since we have a "void *" data pointer, that would point to a
>> struct holding the "real" callback and chaining to the original data
>> pointer.
>>
>> It does incur the cost of
Am 01.12.2016 um 21:19 schrieb Jeff King:
On Thu, Dec 01, 2016 at 12:14:42PM -0800, Junio C Hamano wrote:
Jeff King writes:
To make matters more fun, apparently[1] there are multiple variants of
qsort_r with different argument orders. _And_ apparently Microsoft
defines
On Thu, Dec 01, 2016 at 12:22:37PM -0800, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> > Eh, wait. BSD and Microsoft have paramters reordered in the
> > callback comparison function. I suspect that would not fly very
> > well.
>
> Hmm. We could do it like this,
Jeff King writes:
> On Thu, Dec 01, 2016 at 12:14:42PM -0800, Junio C Hamano wrote:
>
>> Eh, wait. BSD and Microsoft have paramters reordered in the
>> callback comparison function. I suspect that would not fly very
>> well.
>
> You can hack around it by passing a wrapper
Junio C Hamano writes:
> Eh, wait. BSD and Microsoft have paramters reordered in the
> callback comparison function. I suspect that would not fly very
> well.
Hmm. We could do it like this, which may not be too bad.
#if APPLE_QSORT_R
struct apple_qsort_adapter {
On Thu, Dec 01, 2016 at 12:14:42PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> > To make matters more fun, apparently[1] there are multiple variants of
> > qsort_r with different argument orders. _And_ apparently Microsoft
> > defines qsort_s, but it's not quite the same
Jeff King writes:
> To make matters more fun, apparently[1] there are multiple variants of
> qsort_r with different argument orders. _And_ apparently Microsoft
> defines qsort_s, but it's not quite the same thing. But all of that can
> be dealt with by having more specific flags
On Thu, Dec 01, 2016 at 05:26:43PM +0100, René Scharfe wrote:
> The function qsort_s() was introduced with C11 Annex K; it provides the
> ability to pass a context pointer to the comparison function, supports
> the convention of using a NULL pointer for an empty array and performs a
> few safety
Am 01.12.2016 um 17:26 schrieb René Scharfe:
> The function qsort_s() was introduced with C11 Annex K; it provides the
> ability to pass a context pointer to the comparison function, supports
> the convention of using a NULL pointer for an empty array and performs a
> few safety checks.
>
> Add
The function qsort_s() was introduced with C11 Annex K; it provides the
ability to pass a context pointer to the comparison function, supports
the convention of using a NULL pointer for an empty array and performs a
few safety checks.
Add an implementation based on compat/qsort.c for platforms
13 matches
Mail list logo