/src/modules/m_ssl_mbedtls.cpp
/src/modules/m_ssl_openssl.cpp
+/win/Win32
+/win/*.dir
* and functions needed to make a module loadable by the OS.
* It defines the class factory and external init_module function.
*/
-#ifdef _WIN32
-
#define MODULE_INIT(y) \
extern "C" DllExport Module * MODULE_INIT_SYM() \
{ \
return new y; \
} \
- BOOLEAN WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved) \
- { \
- switch ( nReason ) \
- { \
- case DLL_PROCESS_ATTACH: \
- case DLL_PROCESS_DETACH: \
- break; \
- } \
- return TRUE; \
- } \
extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION;
-#else
-
-#define MODULE_INIT(y) \
- extern "C" DllExport Module * MODULE_INIT_SYM() \
- { \
- return new y; \
- } \
- extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION;
-#endif
-
#define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>)
#endif
/** Shun class
*/
-class CoreExport Shun : public XLine
+class Shun : public XLine
{
public:
/** Create a Shun.
enum ErrorCode
{
/** No error has occurred. */
- NO_ERROR,
+ SUCCESS,
/** The database identifier is invalid. */
BAD_DBID,
std::vector<std::string> colnames;
std::vector<SQL::Row> fieldlists;
- MySQLresult(MYSQL_RES* res, int affected_rows) : err(SQL::NO_ERROR), currentrow(0), rows(0)
+ MySQLresult(MYSQL_RES* res, int affected_rows) : err(SQL::SUCCESS), currentrow(0), rows(0)
{
if (affected_rows >= 1)
{
for(ResultQueue::iterator i = Parent->rq.begin(); i != Parent->rq.end(); i++)
{
MySQLresult* res = i->r;
- if (res->err.code == SQL::NO_ERROR)
+ if (res->err.code == SQL::SUCCESS)
i->q->OnResult(*res);
else
i->q->OnError(res->err);
void SocketEngine::LookupMaxFds()
{
+#if defined _WIN32
+ MaxSetSize = FD_SETSIZE;
+#else
struct rlimit limits;
if (!getrlimit(RLIMIT_NOFILE, &limits))
MaxSetSize = limits.rlim_cur;
#endif
if (!setrlimit(RLIMIT_NOFILE, &limits))
MaxSetSize = limits.rlim_cur;
+#endif
}
void SocketEngine::ChangeEventMask(EventHandler* eh, int change)
string(REGEX REPLACE ".*InspIRCd-([0-9]*).*" "\\1" VERSION_MAJOR "${VERSIONSH}")
string(REGEX REPLACE ".*InspIRCd-[0-9]*\\.([0-9]*).*" "\\1" VERSION_MINOR "${VERSIONSH}")
string(REGEX REPLACE ".*InspIRCd-[0-9]*\\.[0-9]*\\.([0-9]*).*" "\\1" VERSION_PATCH "${VERSIONSH}")
+string(REGEX REPLACE ".*InspIRCd-([^\"]+).*" "\\1" VERSION_FULL "${VERSIONSH}")
if(MSVC)
# Without /SAFESEH:NO old libraries compiled with VS 2010 or older won't link correctly to VS2012 (eg, extra module libs)