core: Add Insurgency support for amd64 Windows (#1295)
* Add basic Insurgency support on Windows x64 This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with. * Fix 32bit builds * Compile MySQL extension as well The hack for __iob_func being removed from the core runtime, but required by the old mysql we're building against can be simplified a lot due to the `_ReturnAddress` intrinsic available since MSVC 2015. * Don't include the offset we want to extract in the signature
This commit is contained in:
@@ -185,7 +185,7 @@ bool MyDatabase::DoSimpleQuery(const char *query)
|
||||
|
||||
IQuery *MyDatabase::DoQuery(const char *query)
|
||||
{
|
||||
if (mysql_real_query(m_mysql, query, strlen(query)) != 0)
|
||||
if (mysql_real_query(m_mysql, query, static_cast<unsigned long>(strlen(query))) != 0)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ bool MyDatabase::DoSimpleQueryEx(const char *query, size_t len)
|
||||
|
||||
IQuery *MyDatabase::DoQueryEx(const char *query, size_t len)
|
||||
{
|
||||
if (mysql_real_query(m_mysql, query, len) != 0)
|
||||
if (mysql_real_query(m_mysql, query, static_cast<unsigned long>(len)) != 0)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ IPreparedQuery *MyDatabase::PrepareQuery(const char *query, char *error, size_t
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mysql_stmt_prepare(stmt, query, strlen(query)) != 0)
|
||||
if (mysql_stmt_prepare(stmt, query, static_cast<unsigned long>(strlen(query))) != 0)
|
||||
{
|
||||
if (error)
|
||||
{
|
||||
|
||||
@@ -224,7 +224,7 @@ void MyDriver::ShutdownThreadSafety()
|
||||
mysql_thread_end();
|
||||
}
|
||||
|
||||
unsigned int strncopy(char *dest, const char *src, size_t count)
|
||||
size_t strncopy(char *dest, const char *src, size_t count)
|
||||
{
|
||||
if (!count)
|
||||
{
|
||||
|
||||
@@ -88,6 +88,6 @@ private:
|
||||
|
||||
extern MyDriver g_MyDriver;
|
||||
|
||||
unsigned int strncopy(char *dest, const char *src, size_t count);
|
||||
size_t strncopy(char *dest, const char *src, size_t count);
|
||||
|
||||
#endif //_INCLUDE_SM_MYSQL_DRIVER_H_
|
||||
|
||||
Reference in New Issue
Block a user