Fixed windows build
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user