Bill 2 years ago
commit 9c2bac3ec1

@ -27,7 +27,7 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dummy.cpp" />
<ClCompile Include="..\server\tests\testmain.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>

@ -8,14 +8,16 @@
// #include "robin_hood.h"
#include "unordered_dense.h"
// only works for 64 bit systems
constexpr size_t _FNV_offset_basis = 14695981039346656037ULL;
constexpr size_t _FNV_prime = 1099511628211ULL;
namespace hasher_consts{
constexpr size_t _FNV_offset_basis = 14695981039346656037ULL;
constexpr size_t _FNV_prime = 1099511628211ULL;
}
inline size_t append_bytes(const unsigned char* _First) noexcept {
size_t _Val = _FNV_offset_basis;
size_t _Val = hasher_consts::_FNV_offset_basis;
for (; *_First; ++_First) {
_Val ^= static_cast<size_t>(*_First);
_Val *= _FNV_prime;
_Val *= hasher_consts::_FNV_prime;
}
return _Val;

@ -82,7 +82,7 @@ inline char* to_text(char text[], unsigned long long i) { return to_text_from_in
// Copyright (c) 2022 Bill Sun
//#if defined(SIZEOF___INT128) || (defined(SIZEOF___INT128_T) && defined(SIZEOF___UINT128_T))
#if defined(__SIZEOF_INT128__)
constexpr static __uint128_t _10_19 = 10000000000000000000ull,
_10_37 = _10_19*_10_19 / 10;
@ -118,4 +118,4 @@ char* jeaiii_i128(char* buf, T v){
buf = to_text(buf, uint64_t(v % _10_19));
return buf;
}
// #endif
#endif // INT128

@ -161,4 +161,5 @@ template<> char* aq_to_chars<char*>(void* , char*);
template<> char* aq_to_chars<types::date_t>(void* , char*);
template<> char* aq_to_chars<types::time_t>(void* , char*);
template<> char* aq_to_chars<types::timestamp_t>(void* , char*);
typedef int (*code_snippet)(void*);
#endif

@ -6,7 +6,7 @@
#include "monetdb_conn.h"
#include "monetdbe.h"
#include "table.h"
#undef ERROR
#undef static_assert
constexpr const char* monetdbe_type_str[] = {

@ -118,7 +118,6 @@ A_Semaphore prompt{ true }, engine{ false };
#define ENGINE_RELEASE()
#endif
typedef int (*code_snippet)(void*);
typedef void (*module_init_fn)(Context*);
int n_recv = 0;
@ -193,6 +192,8 @@ constexpr prt_fn_t monetdbe_prtfns[] = {
};
#include "monetdbe.h"
#undef max
#undef min
inline constexpr static unsigned char monetdbe_type_szs[] = {
sizeof(monetdbe_column_bool::null_value), sizeof(monetdbe_column_int8_t::null_value),
sizeof(monetdbe_column_int16_t::null_value), sizeof(monetdbe_column_int32_t::null_value),
@ -626,7 +627,7 @@ int launcher(int argc, char** argv){
str = std::string("cd ") + pwd + std::string("&& python3 ./prompt.py ") + str;
return system(str.c_str());
}
#if !( defined(_MSC_VER) && defined(_DEBUG) )
extern "C" int __DLLEXPORT__ main(int argc, char** argv) {
#ifdef __AQ_BUILD_LAUNCHER__
return launcher(argc, argv);
@ -680,3 +681,4 @@ extern "C" int __DLLEXPORT__ main(int argc, char** argv) {
return 0;
}
#endif // MSCDBG

@ -24,7 +24,7 @@ namespace types {
enum Type_t;
template <typename T>
struct Types;
template <class T1, class T2>
template <class T1, class T2, class ...Ts>
struct Coercion;
}
#endif

@ -1,7 +1,8 @@
#ifndef _WINHELPER_H
#define _WINHELPER_H
#ifdef _WIN32
static constexpr int RTLD_LAZY = 1;
static constexpr int RTLD_LAZY = 1, RTLD_NOW = 1;
void* dlopen(const char*, int);
void* dlsym(void*, const char*);
int dlclose(void*);
@ -20,11 +21,13 @@ class A_Semaphore {
private:
void* native_handle;
public:
A_Semaphore();
A_Semaphore(bool);
void acquire();
void release();
~A_Semaphore();
};
#endif
#endif
#endif // WIN32
#endif // WINHELPER

Loading…
Cancel
Save