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

Windows: Remove the workaround using vsnprintf. #8942

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Mar 25, 2020

This is not needed, the functions are both defined in legacy_stdio_definitions.cpp in the same way. So use snprintf directly.

This partly reverts #5533.

But add Link(legacy_stdio_definitions), as that's where these functions reside now, since VS 2015.
(This one is needed regardless of this change)

This is not needed, the functions are both defined in legacy_stdio_definitions.cpp in the same way. So use snprintf directly.

This partly reverts commit b293b01.

But add Link(legacy_stdio_definitions), as that's where these functions reside now, since VS 2015.
https://docs.microsoft.com/en-us/cpp/porting/visual-cpp-change-history-2003-2015?view=vs-2019#stdio_and_conio
(This one is needed regardless of this change)
@oprypin
Copy link
Member Author

oprypin commented Mar 25, 2020

cc @RX14

@oprypin
Copy link
Member Author

oprypin commented Mar 25, 2020

It's an interesting dilemma, as since VS2015 these functions exist only in legacy_stdio_definitions, but before that this file didn't exist.

Is it also possible that @RX14's observations originally were done on an older VS than that?

Copy link
Contributor

@RX14 RX14 left a comment

Choose a reason for hiding this comment

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

Well it worked at the time!

I'm glad this documented solution exists though.

@RX14 RX14 added the platform:windows Windows support based on the MSVC toolchain / Win32 API label Mar 26, 2020
@RX14 RX14 added this to the 0.34.0 milestone Mar 26, 2020
@RX14 RX14 merged commit c8c6685 into crystal-lang:master Mar 26, 2020
carlhoerberg pushed a commit to carlhoerberg/crystal that referenced this pull request Apr 29, 2020
This is not needed, the functions are both defined in legacy_stdio_definitions.cpp in the same way. So use snprintf directly.

This partly reverts commit b293b01.

But add Link(legacy_stdio_definitions), as that's where these functions reside now, since VS 2015.
https://docs.microsoft.com/en-us/cpp/porting/visual-cpp-change-history-2003-2015?view=vs-2019#stdio_and_conio
(This one is needed regardless of this change)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:refactor platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants