Last active
August 29, 2015 14:25
-
-
Save xenoscopic/46ac990b3e6b2a6d088e to your computer and use it in GitHub Desktop.
libssh2 VS2015 snprintf/strtoll detection patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0a1,4 | |
> # Patched version of (one of) libssh2's CMakeLists.txt. Overrides finding of | |
> # strtoll and snprintf for MSVC 14+, because CMake doesn't seem to find | |
> # functions or symbols, either due to them being inlined, the new universal CRT, | |
> # or something... | |
275a280,286 | |
> # HACK: These aren't detected correctly for MSVC 14 | |
> if(MSVC) | |
> if(NOT MSVC_VERSION VERSION_LESS 1900) | |
> SET(HAVE_STRTOLL 1) | |
> SET(HAVE_SNPRINTF 1) | |
> endif() | |
> endif() |
snprintf() is new in Visual Studio 2015. Before that it only supported the slightly not-standard _snprintf().
strtoll() is available since Visual Studio 2013.
Yeah, I think the problem has more to do with the universal CRT, because strtoll
isn't new and wasn't broken before.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're wondering about versioning - Visual Studio 2015 contains Microsoft Visual C++ (MSVC) 14 which has an RTM version number of 19.00.23026 (which is where the 1900 comes from). They should have sent a poet...