scripted-diff: Rename UNIQUE_NAME to BITCOIN_UNIQUE_NAME #35487

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:260608-win-macro changing 5 files +9 −9
  1. hebasto commented at 6:08 PM on June 8, 2026: member

    #34454 (comment):

    ... it is annoying that we keep running into the same bug over and over again (IIRC it happened in the past at least once for Bitcoin Core). Surely this is going to happen again in the future.

    And here we go again.


    The nb30.h Windows header defines UNIQUE_NAME as a macro.

    This introduces a fragile dependency on header inclusion order: if Windows headers happen to be included before UNIQUE_NAME is used, the preprocessor expands it into a numeric literal, causing syntax errors.

    Rename the macro to BITCOIN_UNIQUE_NAME to remove this fragility and avoid the collision entirely.


    Noticed while doing a Guix build of the QML repo for Windows.

    Recent similar PRs: #34454 and #34868.

  2. scripted-diff: Rename UNIQUE_NAME to BITCOIN_UNIQUE_NAME
    The `nb30.h` Windows header defines `UNIQUE_NAME` as a macro.
    
    This introduces a fragile dependency on header inclusion order: if
    Windows headers happen to be included before `UNIQUE_NAME` is used, the
    preprocessor expands it into a numeric literal, causing syntax errors.
    
    Rename the macro to `BITCOIN_UNIQUE_NAME` to remove this fragility and
    avoid the collision entirely.
    
    -BEGIN VERIFY SCRIPT-
    sed -i 's/\<UNIQUE_NAME\>/BITCOIN_UNIQUE_NAME/g' $(git grep -l 'UNIQUE_NAME' ./src/)
    -END VERIFY SCRIPT-
    fba713a28c
  3. hebasto added the label Refactoring on Jun 8, 2026
  4. DrahtBot commented at 6:08 PM on June 8, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35487.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sedited, w0xlt, maflcko

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. DrahtBot added the label CI failed on Jun 8, 2026
  6. DrahtBot commented at 7:17 PM on June 8, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task Alpine (musl): https://github.com/bitcoin/bitcoin/actions/runs/27157390674/job/80163685993</sub> <sub>LLM reason (✨ experimental): CI failed because CTest timed out running the mptest test (mptest — Timeout after ~2400s).</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  7. sedited approved
  8. sedited commented at 8:56 PM on June 8, 2026: contributor

    ACK fba713a28c89ee565cc2d20bdd3b0690e3a1f5b8

  9. w0xlt commented at 3:30 AM on June 9, 2026: contributor

    ACK fba713a28c89ee565cc2d20bdd3b0690e3a1f5b8

  10. maflcko commented at 5:40 AM on June 9, 2026: member

    lgtm ACK fba713a28c89ee565cc2d20bdd3b0690e3a1f5b8

  11. sedited merged this on Jun 9, 2026
  12. sedited closed this on Jun 9, 2026

  13. hebasto deleted the branch on Jun 9, 2026

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-06-11 10:51 UTC

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