the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 28 lines 913 B view raw
1// CRT compatibility shim for linking VS2012-era libraries with VS2022 2// Provides symbols removed in the Universal CRT (VS2015+) 3 4#include <cstdio> 5#include <cstring> 6 7// __iob_func was removed in VS2015. Old code (e.g. libpng) references it. 8// Provide a shim that returns the stdio file pointers. 9extern "C" FILE* __iob_func(void) 10{ 11 // The old __iob_func returned an array of {stdin, stdout, stderr}. 12 // In the Universal CRT, these are functions, not a contiguous array. 13 // We return a static array mimicking the old layout. 14 static FILE iob[3]; 15 iob[0] = *stdin; 16 iob[1] = *stdout; 17 iob[2] = *stderr; 18 return iob; 19} 20 21// std::_Winerror_map was an internal MSVC runtime function used by 22// std::system_category::message(). Old .lib files compiled with VS2012 23// may reference it. Provide a minimal stub. 24namespace std { 25 const char* _Winerror_map(int) { 26 return ""; 27 } 28}