Fix: OSX QT compile: move bswap_XX into Bitcoin:: to avoid collision with existing definitions #9372

pull kallewoof wants to merge 2 commits into bitcoin:master from kallewoof:rename-bswap_XX changing 8 files +95 −21
  1. kallewoof commented at 3:43 AM on December 17, 2016: member

    [This is an alternative approach to #9366]

    The bswap_XX functions are sometimes provided by external libraries (protobuf) and sometimes not. To avoid inconsistency and relying on include order, the idea is to move these into a dedicated namespace (Bitcoin). Since they are declared as macros by e.g. protobuf, they are #undefd as well.

    The one caveat with this approach is when someone would include compat/byteswap.h, and then include protobuf's port.h (in that order). In this case, the macro would be redefined and Bitcoin::bswap_XX would result in a compilation error.

  2. Moves bswap_XX into Bitcoin::, ignoring pre-existing macros, if any. 0315f5fde9
  3. Tests for bswap. b8306853b0
  4. fanquake added the label MacOSX on Dec 17, 2016
  5. kallewoof commented at 7:31 AM on December 19, 2016: member

    Alternative merged.

  6. kallewoof closed this on Dec 19, 2016

  7. kallewoof deleted the branch on Dec 19, 2016
  8. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me