[openssl-dev] Endianess info

Andy Polyakov appro at openssl.org
Sun Feb 14 10:27:08 UTC 2016


> Does this patch work for you?

I'd vote against [catering this information in public header]. As it
stands now -D[BL]_ENDIAN in OpenSSL config lines is actually just an
optimization flag, and not as significant one. "Optimization flag" means
that you can actually omit it, and it will still work, and "not as
significant" means that not very much slower. Real endian dependencies
are handled either by adhering to endian-neutral coding practices or so
called constant conditions, such as if (endian.little). Advantage of
constant condition is that both paths are parsed by compilers, so that
at least code handling "less popular" endianness doesn't end up in
majority's blind spot. There is no reason for why either of these
techniques can't be exercised in off-tree code.



More information about the openssl-dev mailing list