FreeBSD Bugzilla – Attachment 148195 Details for
Bug 135718
[patch] enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated diff
qsort.diff (text/plain), 751 bytes, created by
Pedro F. Giffuni
on 2014-10-11 16:40:17 UTC
(
hide
)
Description:
Updated diff
Filename:
MIME Type:
Creator:
Pedro F. Giffuni
Created:
2014-10-11 16:40:17 UTC
Size:
751 bytes
patch
obsolete
>Index: lib/libc/stdlib/qsort.c >=================================================================== >--- lib/libc/stdlib/qsort.c (revision 272939) >+++ lib/libc/stdlib/qsort.c (working copy) >@@ -59,8 +59,9 @@ > } while (--i > 0); \ > } > >-#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ >- es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; >+#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(int) || \ >+ es % sizeof(int) ? 2 : ((char *)a - (char *)0) % sizeof(long) ? 1 : \ >+ es != sizeof(long); > > static inline void > swapfunc(a, b, n, swaptype) >@@ -68,7 +69,7 @@ > int n, swaptype; > { > if(swaptype <= 1) >- swapcode(long, a, b, n) >+ swapcode(int, a, b, n) > else > swapcode(char, a, b, n) > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 135718
:
97013
|
148195
|
152798