refactor: prefix external config macros with SECP256K1_ #1833

pull w0xlt wants to merge 6 commits into bitcoin-core:master from w0xlt:prefix-macros-secp256k1 changing 49 files +459 −459
  1. w0xlt commented at 4:17 pm on March 3, 2026: contributor

    This PR renames 22 externally-configured preprocessor macros (set via -D flags in configure.ac / CMakeLists.txt) to use the SECP256K1_ prefix, addressing part of #1449.

    Renamed macros:

    • ENABLE_MODULE_{ECDH,RECOVERY,EXTRAKEYS,SCHNORRSIG,MUSIG,ELLSWIFT}
    • VERIFY
    • USE_ASM_X86_64, USE_EXTERNAL_ASM, USE_FORCE_WIDEMUL_{INT128,INT128_STRUCT,INT64}, USE_EXTERNAL_DEFAULT_CALLBACKS
    • ECMULT_WINDOW_SIZE, COMB_BLOCKS, COMB_TEETH
    • EXHAUSTIVE_TEST_ORDER
    • DETERMINISTIC, COVERAGE, VALGRIND, DEBUG_CONFIG, SUPPORTS_CONCURRENCY

    These macros are defined via -D compiler flags during the build. Generic names like VERIFY, COVERAGE, and DETERMINISTIC can clash with flags from projects that build secp256k1 from source.

    These are macros relatively safe to rename: they are defined entirely by the build system, do not affect the public API or ABI, and have no interdependencies with internal macros. If this approach is accepted, the same pattern can be applied to the remaining internal macros identified in #1449.

  2. refactor: prefix ENABLE_MODULE_* macros with SECP256K1_
    Rename all ENABLE_MODULE_{ECDH,RECOVERY,EXTRAKEYS,SCHNORRSIG,MUSIG,
    ELLSWIFT} preprocessor macros to SECP256K1_ENABLE_MODULE_* to avoid
    namespace collisions and ensure consistency with the library's naming
    convention.
    1bf871990c
  3. refactor: prefix VERIFY macro with SECP256K1_
    Rename the standalone VERIFY preprocessor config macro to
    SECP256K1_VERIFY. This does not affect VERIFY_CHECK or other
    compound macros which will be addressed separately.
    
    Updates build definitions in Makefile.am, src/CMakeLists.txt,
    and CI configuration.
    45667892a6
  4. refactor: prefix USE_* config macros with SECP256K1_
    Rename USE_ASM_X86_64, USE_EXTERNAL_ASM, USE_FORCE_WIDEMUL_INT128,
    USE_FORCE_WIDEMUL_INT128_STRUCT, USE_FORCE_WIDEMUL_INT64, and
    USE_EXTERNAL_DEFAULT_CALLBACKS to their SECP256K1_ prefixed
    equivalents.
    
    Updates configure.ac and CMakeLists.txt build definitions alongside
    all source file references.
    0e0d0106c3
  5. refactor: prefix ECMULT_WINDOW_SIZE, COMB_BLOCKS, COMB_TEETH with SECP256K1_
    Rename the externally configurable ecmult parameter macros to use the
    SECP256K1_ prefix, preventing namespace collisions when the library
    is used in header-only mode.
    9a720f4322
  6. refactor: prefix EXHAUSTIVE_TEST_ORDER with SECP256K1_
    Rename the EXHAUSTIVE_TEST_ORDER config macro used in exhaustive
    test builds to SECP256K1_EXHAUSTIVE_TEST_ORDER to follow the
    library's naming convention.
    beb4e7bd5d
  7. refactor: prefix DETERMINISTIC, COVERAGE, VALGRIND, DEBUG_CONFIG, SUPPORTS_CONCURRENCY with SECP256K1_
    Rename the remaining external config macros to use the SECP256K1_
    prefix:
    
    - DETERMINISTIC -> SECP256K1_DETERMINISTIC
    - COVERAGE -> SECP256K1_COVERAGE
    - VALGRIND -> SECP256K1_VALGRIND
    - DEBUG_CONFIG -> SECP256K1_DEBUG_CONFIG
    - SUPPORTS_CONCURRENCY -> SECP256K1_SUPPORTS_CONCURRENCY
    
    Updates build definitions in configure.ac, CMakeLists.txt,
    src/CMakeLists.txt, CI workflow, and all source file references.
    02b569d840
  8. w0xlt force-pushed on Mar 3, 2026


w0xlt


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-09 12:15 UTC

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