[Bug 216157] [exp-run] Standardize on thunk-last qsort_r
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Feb 10 17:54:29 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216157
--- Comment #8 from Conrad Meyer <cem at freebsd.org> ---
(In reply to Antoine Brodin from comment #7)
Thanks! It looks like just removing the old definition wouldn't be terribly
*more* broken than leaving it.
The first is C++ and doesn't see the compatibility definition. Looks like that
is going away in a future release, though:
https://github.com/hselasky/midipp/commit/97bcdcf82da22528dbfd17957d8ad6fd448e19eb
For swi-pl, the wrong prototype is detected:
pl-dict.c:137:31: warning: incompatible pointer types passing 'struct
sort_r_data *' to parameter of type 'int (*)(const void *, const void *, void
*)' [-Wincompatible-pointer-types]
qsort_r(base, nel, width, &tmp, &sort_r_arg_swap);
^~~~
/usr/include/stdlib.h:326:55: note: expanded from macro 'qsort_r'
__freebsd11_qsort_r, qsort_r)(base, nmemb, size, A, B)
^
/usr/include/stdlib.h:303:12: note: passing argument to parameter here
int (*)(const void *, const void *, void *), void *);
^
Possibly because sort_r_arg_swap is passed as a pointer to function rather than
the function type? So that one might be fixable from the stdlib header.
Hashcat fails because it compiles in strict C99 mode, no C11 or GCC extensions
allowed:
cc -c -O2 -pipe -fstack-protector -isystem /usr/local/include
-fno-strict-aliasing -std=c99 -Iinclude/ -IOpenCL/ -fpic -o
obj/shared.NATIVE.SHARED.o src/shared.c
In file included from src/shared.c:156:
include/sort_r.h:145:17: error: expected identifier or '('
extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,
^
/usr/include/stdlib.h:324:2: note: expanded from macro 'qsort_r'
__builtin_choose_expr( \
^
1 error generated.
Same for raptor2, which uses the same copy-pasted sort header.
Well, we could always patch these ports. But then we could drop the
compatibility definition while we're at it.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ports-bugs
mailing list