Page MenuHomePhabricator

Use preprocessor macros instead of autoconf to detect endianness

Authored by deadalnix on Sun, Sep 27, 23:18.



This does not fix any particular issue but it's preferable to not
rely on autoconf. This avoids endianness mess for users on BE hosts
if they use their build without autoconf.

The macros are carefully written to err on the side of the caution,
e.g., we #error if the user manually configures a different endianness
than what we detect.

This is a backport of secp256k1 PR787

Test Plan
ninja check-secp256k1

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Sun, Sep 27, 23:22
This revision was landed with ongoing or failed builds.Sun, Sep 27, 23:23
This revision was automatically updated to reflect the committed changes.