[Bug 135718] [patch] enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 6 23:57:45 UTC 2015


--- Comment #6 from Andrey A. Chernov <ache at FreeBSD.org> ---
What is must be done in machine independent code is really simple:

#define SWAPINIT_long(a, es) swaptype_long = ...
#define SWAPINIT_int(a, es) swaptype_int = ...

2) Call both SWAPINITs instead of one.

if (swaptype_long <= 1)
    swapcode(long, a, b, n)
else if (swaptype_int <= 1)
    swapcode(int, a, b, n)
    swapcode(char, a, b, n)

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list