Skip to content

scripted-diff: Rename WAIT_TIMEOUT to TEST_WAIT_TIMEOUT#34868

Merged
fanquake merged 1 commit intobitcoin:masterfrom
hebasto:260319-win-macro
Mar 20, 2026
Merged

scripted-diff: Rename WAIT_TIMEOUT to TEST_WAIT_TIMEOUT#34868
fanquake merged 1 commit intobitcoin:masterfrom
hebasto:260319-win-macro

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Mar 19, 2026

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.

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-
@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 19, 2026

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.

Copy link
Contributor

@w0xlt w0xlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fanquake fanquake merged commit b425a81 into bitcoin:master Mar 20, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants