Revert "BUG/MEDIUM: random: implement per-thread and per-process random sequences"
authorWilly Tarreau <w@1wt.eu>
Sat, 7 Mar 2020 10:24:39 +0000 (11:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 7 Mar 2020 10:24:39 +0000 (11:24 +0100)
commit0fbf28a05b416e27e65bcf8a39fb18bb3aff2743
tree51c7f6d2268fdbefc74500e8ff36231224a52f2e
parent1c306aa84d785b9c2240bf7767dcc1f2596cfcfd
Revert "BUG/MEDIUM: random: implement per-thread and per-process random sequences"

This reverts commit 1c306aa84d785b9c2240bf7767dcc1f2596cfcfd.

It breaks the build on all non-glibc platforms. I got confused by the
man page (which possibly is the most confusing man page I've ever read
about a standard libc function) and mistakenly understood that random_r
was portable, especially since it appears in latest freebsd source as
well but not in released versions, and with a slightly different API :-/

We need to find a different solution with a fallback. Among the
possibilities, we may reintroduce this one with a fallback relying on
locking around the standard functions, keeping fingers crossed for no
other library function to call them in parallel, or we may also provide
our own PRNG, which is not necessarily more difficult than working
around the totally broken up design of the portable API.
include/common/standard.h
include/types/global.h
src/51d.c
src/backend.c
src/flt_spoe.c
src/flt_trace.c
src/haproxy.c
src/memory.c
src/pattern.c
src/peers.c
src/sample.c