scripted-diff: Rename WAIT_TIMEOUT to TEST_WAIT_TIMEOUT #34868

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:260319-win-macro changing 1 files +3 −3
  1. hebasto commented at 4:26 pm on March 19, 2026: member

    On Windows, the winerror.h header defines WAIT_TIMEOUT as a macro.

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

    Rename the variable to TEST_WAIT_TIMEOUT to remove this fragility and avoid the collision entirely.

    Split from #34448.

    Similar to #34454.

  2. scripted-diff: Rename `WAIT_TIMEOUT` to `TEST_WAIT_TIMEOUT`
    On Windows, the `winerror.h` header defines `WAIT_TIMEOUT` as a macro.
    
    This introduces a fragile dependency on header inclusion order: if
    Windows headers happen to be included before using `WAIT_TIMEOUT`, the
    preprocessor expands it into a numeric literal, causing syntax errors.
    
    Rename the variable to `TEST_WAIT_TIMEOUT` to remove this fragility and
    avoid the collision entirely.
    
    -BEGIN VERIFY SCRIPT-
    sed -i 's/\<WAIT_TIMEOUT\>/TEST_WAIT_TIMEOUT/g' $(git grep -l 'WAIT_TIMEOUT' ./src/)
    -END VERIFY SCRIPT-
    658e68f95b
  3. hebasto added the label Refactoring on Mar 19, 2026
  4. hebasto added the label Tests on Mar 19, 2026
  5. DrahtBot commented at 4:26 pm on March 19, 2026: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK w0xlt

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  6. w0xlt commented at 11:05 pm on March 19, 2026: contributor

    ACK 658e68f95b19aee765da1990c004805810d48c34

    Reference: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

  7. fanquake merged this on Mar 20, 2026
  8. fanquake closed this on Mar 20, 2026

  9. hebasto deleted the branch on Mar 20, 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-03-24 03:12 UTC

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