2023-09-10 19:22:01 +00:00
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
namespace msvcrt {
|
|
|
|
int _commode;
|
|
|
|
int _fmode;
|
|
|
|
|
|
|
|
// Stub because we're only ever a console application
|
|
|
|
void WIN_FUNC __set_app_type(int at) {
|
|
|
|
}
|
|
|
|
|
|
|
|
int* WIN_FUNC __p__fmode() {
|
|
|
|
return &_fmode;
|
|
|
|
}
|
|
|
|
|
|
|
|
int* WIN_FUNC __p__commode() {
|
|
|
|
return &_commode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void *resolveByName(const char *name) {
|
|
|
|
if (strcmp(name, "__set_app_type") == 0) return (void *) msvcrt::__set_app_type;
|
|
|
|
if (strcmp(name, "__p__fmode") == 0) return (void *) msvcrt::__p__fmode;
|
|
|
|
if (strcmp(name, "__p__commode") == 0) return (void *) msvcrt::__p__commode;
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
wibo::Module lib_msvcrt = {
|
|
|
|
(const char *[]){
|
2023-09-12 13:44:56 +00:00
|
|
|
"msvcrt",
|
|
|
|
"msvcrt.dll",
|
2023-09-10 19:22:01 +00:00
|
|
|
"msvcrt40",
|
|
|
|
"msvcrt40.dll",
|
2023-09-12 13:44:56 +00:00
|
|
|
"msvcr70",
|
|
|
|
"msvcr70.dll",
|
2023-09-10 19:22:01 +00:00
|
|
|
nullptr,
|
|
|
|
},
|
|
|
|
resolveByName,
|
|
|
|
nullptr,
|
|
|
|
};
|