Export some symbols for Windows (#1088)
This commit is contained in:
parent
df331c8a74
commit
895552dcae
|
@ -14,6 +14,7 @@
|
|||
#pragma once
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <iostream>
|
||||
|
||||
namespace drogon
|
||||
{
|
||||
|
@ -168,5 +169,26 @@ enum class WebSocketMessageType
|
|||
Close,
|
||||
Unknown
|
||||
};
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &out, drogon::ReqResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
case ReqResult::Ok:
|
||||
return out << "OK";
|
||||
case ReqResult::BadResponse:
|
||||
return out << "Bad response from server";
|
||||
case ReqResult::NetworkFailure:
|
||||
return out << "Network failure";
|
||||
case ReqResult::BadServerAddress:
|
||||
return out << "Bad server address";
|
||||
case ReqResult::Timeout:
|
||||
return out << "Timeout";
|
||||
case ReqResult::HandshakeError:
|
||||
return out << "Handshake error";
|
||||
case ReqResult::InvalidCertificate:
|
||||
return out << "Invalid certificate";
|
||||
default:
|
||||
return out << "Unknown error";
|
||||
}
|
||||
}
|
||||
} // namespace drogon
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include <algorithm>
|
||||
#ifdef _WIN32
|
||||
#include <time.h>
|
||||
char *strptime(const char *s, const char *f, struct tm *tm);
|
||||
time_t timegm(struct tm *tm);
|
||||
DROGON_EXPORT char *strptime(const char *s, const char *f, struct tm *tm);
|
||||
DROGON_EXPORT time_t timegm(struct tm *tm);
|
||||
#endif
|
||||
namespace drogon
|
||||
{
|
||||
|
|
|
@ -256,15 +256,17 @@ class DROGON_EXPORT Criteria
|
|||
}
|
||||
|
||||
private:
|
||||
friend const Criteria operator&&(Criteria cond1, Criteria cond2);
|
||||
friend DROGON_EXPORT const Criteria operator&&(Criteria cond1,
|
||||
Criteria cond2);
|
||||
|
||||
friend const Criteria operator||(Criteria cond1, Criteria cond2);
|
||||
friend DROGON_EXPORT const Criteria operator||(Criteria cond1,
|
||||
Criteria cond2);
|
||||
std::string conditionString_;
|
||||
std::function<void(internal::SqlBinder &)> outputArgumentsFunc_;
|
||||
}; // namespace orm
|
||||
|
||||
const Criteria operator&&(Criteria cond1, Criteria cond2);
|
||||
const Criteria operator||(Criteria cond1, Criteria cond2);
|
||||
DROGON_EXPORT const Criteria operator&&(Criteria cond1, Criteria cond2);
|
||||
DROGON_EXPORT const Criteria operator||(Criteria cond1, Criteria cond2);
|
||||
|
||||
} // namespace orm
|
||||
} // namespace drogon
|
||||
|
|
Loading…
Reference in New Issue