[openssl-dev] Endianess info
Andy Polyakov
appro at openssl.org
Sun Feb 14 16:58:13 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.
>
>
> The endianess information could be used in case of cross-compilation.
Endian-neutral coding and constant conditions work in cross-compilation
cases.
More information about the openssl-dev
mailing list