This should work on Linux since kernel 3.17, OS X since 10.12, OpenBSD
since 5.6, and FreeBSD since 12.0. It also introduces no external
dependencies. Note that getentropy should only be called with at most
256 bytes or it will return EIO. The getrandom variant on Linux doesn't
check for this. If called with len > 256, it's allowed to produce a
short read if it gets interrupted. This should show up as an error, so
everything's fine.
- Condense the allocator section in defs.h and make it match the
surrounding style.
- Use real calloc in c3_calloc. Some guy on the internet says
calloc can be faster than malloc since the OS may not actually
need to call memset.
- Replace calloc calls in vere code with c3_calloc.
Note that I left the c3_calloc definition as-is (i.e., not taking
a count argument). I was going to change it, but it seems like
count is 1 at all call sites. If it's ever used with count != 1,
I'd be in support of changing it, fwiw.
You'll note that ex involves more endianness twiddling. This is
unfortunate, but en is exactly as stupid as you'd hope it would be,
so I'm going to call it okay.
Also, fixed ex. In particular, (ex:aesc 0) now agrees with the C's
output. Our bad.