Fixed windows build

This commit is contained in:
2022-09-26 04:44:09 +08:00
parent 3229a54bd4
commit 2ed0fd7863
9 changed files with 42 additions and 21 deletions
+2 -2
View File
@@ -176,10 +176,10 @@ int dll_main(int argc, char** argv, Context* cxt){
//getlasterror
if (!user_module_handle)
#ifndef _MSC_VER
#ifndef _WIN32
puts(dlerror());
#else
printf("Fatal Error: Module %s failed to load with error code %d.\n", mname, GetLastError());
printf("Fatal Error: Module %s failed to load with error code %d.\n", mname, dlerror());
#endif
user_module_map[mname] = user_module_handle;
initialize_module(mname, user_module_handle, cxt);
+6 -1
View File
@@ -22,7 +22,12 @@ inline constexpr monetdbe_types AQType_2_monetdbe[] = {
#else
monetdbe_int64_t,
#endif
monetdbe_int16_t, monetdbe_int8_t, monetdbe_bool, monetdbe_int128_t,
monetdbe_int16_t, monetdbe_int8_t, monetdbe_bool,
#ifdef HAVE_HGE
monetdbe_int128_t,
#else
monetdbe_int64_t,
#endif
monetdbe_timestamp, monetdbe_int64_t, monetdbe_int64_t
};
+4
View File
@@ -20,6 +20,10 @@ int dlclose(void* handle)
return FreeLibrary(static_cast<HMODULE>(handle));
}
int dlerror() {
return GetLastError();
}
SharedMemory::SharedMemory(const char* fname)
{
this->hFileMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 2, fname);
+2
View File
@@ -5,6 +5,8 @@ static constexpr int RTLD_LAZY = 1;
void* dlopen(const char*, int);
void* dlsym(void*, const char*);
int dlclose(void*);
int dlerror();
struct SharedMemory
{
void* hFileMap;