Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MSVC: Prevent C4005 redefinition warning for WIN32_LEAN_AND_MEAN #20033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wmamrak wants to merge 2 commits into php:PHP-8.3
base: PHP-8.3
Choose a base branch
Loading
from wmamrak:fix-win32-warning

Conversation

Copy link

@wmamrak wmamrak commented Oct 1, 2025

Build systems often pass /DWIN32_LEAN_AND_MEAN to the compiler. Several headers also define this macro unconditionally, which causes C4005 (macro redefinition) warnings in the build log.

This commit wraps the definitions in #ifndef guards to resolve the warnings.

Build systems often pass /DWIN32_LEAN_AND_MEAN to the compiler. Several headers also define this macro unconditionally, which causes C4005 (macro redefinition) warnings in the build log.
This commit wraps the definitions in #ifndef guards to resolve the warnings.
Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

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

It looks reasonable, just minor NIT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@bukka bukka bukka approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /