Skip to content
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

FIX: MAX_PATH is used within Windows headers, we should use a different define internally #9052

Merged
merged 1 commit into from
Oct 10, 2020
Merged

Conversation

bevanweiss
Copy link
Contributor

@bevanweiss bevanweiss commented Oct 10, 2020

Replace MAX_PATH usage with enum CRYPTO_MAX_PATH, this prevents the redefine warning, and ensures that we don't mess up other usages (which will likely want MAX_PATH as 260, like Windows defines, not 4096 like we do).
The replacement has been done based on what MSVC was telling me the define values were at each point (i.e. whether we wanted it or not, these usages were using our 4906 value, not the 260 value from Windows)

rpcs3/Crypto/utils.h Outdated Show resolved Hide resolved
…nt define internally

Replace MAX_PATH usage with EMU_MAX_PATH, this prevents the redefine warning, and ensures that we don't mess up other usages (which will likely want MAX_PATH as 260, like Windows defines, not 4096 like we do).
The replacement has been done based on what MSVC was telling me the define values were at each point (i.e. whether we wanted it or not, these usages were using our 4906 value, not the 260 value from Windows)
@Nekotekina
Copy link
Member

Where did you encounter the warning? Also max path on PS3 is 1023 but it's not exactly relevant.

@bevanweiss
Copy link
Contributor Author

Where did you encounter the warning? Also max path on PS3 is 1023 but it's not exactly relevant.

It was just one of the 1000+ that MSVC was reporting.
I do have a bunch of the Microsoft 'Best Practice' analysis options selected also, so it's possible it was just one of these.

@Nekotekina
Copy link
Member

Well yeah, I just wanted to know which files included Windows,h since we prefer to avoid/isolate it in general.

@bevanweiss
Copy link
Contributor Author

Inside the rpcs3 code it was just the update_manager bringing in windows.h

@Nekotekina Nekotekina self-requested a review October 10, 2020 12:23
@Nekotekina Nekotekina merged commit 2c8b3f0 into RPCS3:master Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants