1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-28 15:17:46 +00:00

Fixing mysql includes

This commit is contained in:
Mordred 2018-10-26 19:12:55 +02:00
parent 34a5c1d210
commit 423e54d7ec
15 changed files with 31 additions and 25 deletions

View file

@ -2,6 +2,7 @@
#include "MySqlBase.h" #include "MySqlBase.h"
#include "Statement.h" #include "Statement.h"
#include "PreparedStatement.h" #include "PreparedStatement.h"
#include <mysql.h>
#include <vector> #include <vector>

View file

@ -2,9 +2,10 @@
#define SAPPHIRE_CONNECTION_H #define SAPPHIRE_CONNECTION_H
#include <memory> #include <memory>
#include <mysql.h>
#include <map> #include <map>
typedef struct st_mysql MYSQL;
enum mysql_option;
namespace Mysql namespace Mysql
{ {

View file

@ -1,6 +1,7 @@
#include "MySqlBase.h" #include "MySqlBase.h"
#include "Connection.h" #include "Connection.h"
#include <memory> #include <memory>
#include <mysql.h>
Mysql::MySqlBase::MySqlBase() Mysql::MySqlBase::MySqlBase()
{ {

View file

@ -2,14 +2,15 @@
#define SAPPHIRE_MYSQLBASE_H #define SAPPHIRE_MYSQLBASE_H
#include <memory> #include <memory>
#include <mysql.h>
#include <string> #include <string>
#include <map> #include <map>
enum mysql_option;
namespace Mysql namespace Mysql
{ {
using optionMap = std::map< enum mysql_option, std::string >; using optionMap = std::map< enum ::mysql_option, std::string >;
class Connection; class Connection;

View file

@ -5,6 +5,7 @@
#include <variant> #include <variant>
#include <errmsg.h> #include <errmsg.h>
#include <string.h> #include <string.h>
#include <mysql.h>
static const unsigned int MAX_SEND_LONGDATA_BUFFER = 1 << 18; //1<<18=256k (for istream) static const unsigned int MAX_SEND_LONGDATA_BUFFER = 1 << 18; //1<<18=256k (for istream)
static const unsigned int MAX_SEND_LONGDATA_CHUNK = 1 << 18; //1<<19=512k (for string) static const unsigned int MAX_SEND_LONGDATA_CHUNK = 1 << 18; //1<<19=512k (for string)

View file

@ -3,7 +3,8 @@
#include <memory> #include <memory>
#include "Statement.h" #include "Statement.h"
#include <mysql.h>
typedef struct st_mysql_stmt MYSQL_STMT;
namespace Mysql namespace Mysql
{ {

View file

@ -7,6 +7,7 @@
#include <vector> #include <vector>
#include <string.h> #include <string.h>
#include <algorithm> #include <algorithm>
#include <mysql.h>
Mysql::ResultSet::ResultSet( MYSQL_RES* res, std::shared_ptr< Mysql::Statement > par ) Mysql::ResultSet::ResultSet( MYSQL_RES* res, std::shared_ptr< Mysql::Statement > par )
{ {

View file

@ -4,9 +4,12 @@
#include <vector> #include <vector>
#include "ResultSetBase.h" #include "ResultSetBase.h"
#include <mysql.h>
#include <memory> #include <memory>
typedef char **MYSQL_ROW;
typedef struct st_mysql_res MYSQL_RES;
typedef struct st_mysql_field MYSQL_FIELD;
namespace Mysql namespace Mysql
{ {
class Statement; class Statement;

View file

@ -2,6 +2,7 @@
#include "Connection.h" #include "Connection.h"
#include "ResultSet.h" #include "ResultSet.h"
#include "mysql_util.h" #include "mysql_util.h"
#include <mysql.h>
std::shared_ptr< Mysql::Connection > Mysql::Statement::getConnection() std::shared_ptr< Mysql::Connection > Mysql::Statement::getConnection()
{ {

View file

@ -27,8 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <mysql.h>
typedef struct st_mysql_field MYSQL_FIELD;
#ifndef UL64 #ifndef UL64
#ifdef _WIN32 #ifdef _WIN32
#define UL64(x) x##ui64 #define UL64(x) x##ui64

View file

@ -38,7 +38,7 @@ if( UNIX )
else() else()
target_link_libraries( common target_link_libraries( common
PUBLIC PUBLIC
libmysql ) mysql )
endif() endif()
target_include_directories( common target_include_directories( common

View file

@ -5,6 +5,7 @@
#include "PreparedStatement.h" #include "PreparedStatement.h"
#include "Framework.h" #include "Framework.h"
#include <mysql.h>
extern Core::Framework g_fw; extern Core::Framework g_fw;

View file

@ -8,6 +8,7 @@
#include "Framework.h" #include "Framework.h"
#include "Logging/Logger.h" #include "Logging/Logger.h"
#include <mysql.h>
extern Core::Framework g_fw; extern Core::Framework g_fw;

View file

@ -21,7 +21,7 @@ set_target_properties( sapphire_lobby
) )
target_link_libraries( sapphire_lobby target_link_libraries( sapphire_lobby
PRIVATE PRIVATE
common ) common mysql )
if( UNIX ) if( UNIX )
target_link_libraries( sapphire_lobby target_link_libraries( sapphire_lobby
PRIVATE PRIVATE

View file

@ -1,24 +1,24 @@
#include <Connection.h>
#include <Network/Connection.h>
#include <Network/Hive.h>
#include <Network/PacketContainer.h>
#include "Network/GameConnection.h"
#include "ServerZone.h" #include "ServerZone.h"
#include "Framework.h"
#include <Version.h> #include <Version.h>
#include <Logging/Logger.h> #include <Logging/Logger.h>
#include <Config/ConfigMgr.h> #include <Config/ConfigMgr.h>
#include <MySqlBase.h>
#include <Connection.h>
#include <Network/Connection.h>
#include <Network/Hive.h>
#include <Exd/ExdDataGenerated.h> #include <Exd/ExdDataGenerated.h>
#include <Network/PacketContainer.h>
#include <Database/DatabaseDef.h> #include <Database/DatabaseDef.h>
#include <Util/Util.h>
#include "Actor/Player.h" #include "Actor/Player.h"
#include "Actor/BNpcTemplate.h" #include "Actor/BNpcTemplate.h"
#include "Network/GameConnection.h"
#include "Session.h" #include "Session.h"
#include "Zone/TerritoryMgr.h" #include "Zone/TerritoryMgr.h"
@ -26,13 +26,6 @@
#include "Script/ScriptMgr.h" #include "Script/ScriptMgr.h"
#include "Linkshell/LinkshellMgr.h" #include "Linkshell/LinkshellMgr.h"
#include "ForwardsZone.h"
#include <Util/Util.h>
#include <thread>
#include "Framework.h"
extern Core::Framework g_fw; extern Core::Framework g_fw;
Core::ServerZone::ServerZone( const std::string& configName ) : Core::ServerZone::ServerZone( const std::string& configName ) :