[DEBUG] correct .hpp port + clean libC include

This commit is contained in:
Edouard DUPIN 2016-10-02 23:46:07 +02:00
parent 975c124bd4
commit d89531189e
8 changed files with 24 additions and 14 deletions

View File

@ -19,5 +19,15 @@ def create(target, module_name):
'ememory',
#'algue'
])
my_module.add_exclude_symbols([
'*operator<<*',
])
my_module.add_exclude_file([
'debug.hpp',
])
my_module.add_file_patterns([
'*.hpp',
'*.md',
])
return my_module

View File

@ -6,4 +6,4 @@
#include <enet/debug.hpp>
#include <enet/Ftp.hpp>
#include <string.h>
#include <cstring>

View File

@ -8,7 +8,7 @@
#include <enet/Http.hpp>
#include <map>
#include <etk/stdTools.hpp>
#include <string.h>
#include <cstring>
#include <unistd.h>
static std::string escapeChar(const std::string& _value) {

View File

@ -6,11 +6,11 @@
#include <enet/debug.hpp>
#include <enet/Tcp.hpp>
#include <sys/types.hpp>
#include <sys/types.h>
#include <netdb.h>
#include <errno.h>
#include <cerrno>
#include <unistd.h>
#include <string.h>
#include <cstring>
#include <etk/stdTools.hpp>
#ifdef __TARGET_OS__Windows
@ -46,7 +46,7 @@ enet::Tcp::Tcp(int32_t _idSocket, const std::string& _name) :
m_name(_name),
m_status(status::link) {
//Initialize the pollfd structure
memset(m_fds[0], 0 , sizeof(m_fds));
memset(&m_fds[0], 0 , sizeof(m_fds));
//Set up the initial listening socket
m_fds[0].fd = _idSocket;
m_fds[0].events = POLLIN | POLLERR;
@ -60,7 +60,7 @@ enet::Tcp::Tcp(Tcp&& _obj) :
_obj.m_name = "";
_obj.m_status = status::error;
m_fds[0] = _obj.m_fds[0];
memset(m_fds[0], 0 , sizeof(m_fds));
memset(&m_fds[0], 0 , sizeof(m_fds));
}
enet::Tcp::~Tcp() {
@ -76,7 +76,7 @@ enet::Tcp& enet::Tcp::operator = (enet::Tcp&& _obj) {
m_status = _obj.m_status;
_obj.m_status = status::error;
m_fds[0] = _obj.m_fds[0];
memset(m_fds[0], 0 , sizeof(m_fds));
memset(&m_fds[0], 0 , sizeof(m_fds));
return *this;
}

View File

@ -22,7 +22,7 @@ namespace enet {
#else
int32_t m_socketId; //!< socket linux interface generic
#endif
#ifndef __TARGET_OS__Windows
#ifdef __TARGET_OS__Windows
int32_t m_fds[1];
#else
struct pollfd m_fds[1];

View File

@ -10,9 +10,9 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include <cerrno>
#include <unistd.h>
#include <string.h>
#include <cstring>
#include <etk/stdTools.hpp>
#ifdef __TARGET_OS__Windows

View File

@ -8,9 +8,9 @@
#include <enet/Tcp.hpp>
#include <enet/TcpServer.hpp>
#include <sys/types.h>
#include <errno.h>
#include <cerrno>
#include <unistd.h>
#include <string.h>
#include <cstring>
#include <etk/stdTools.hpp>
#ifdef __TARGET_OS__Windows

View File

@ -8,7 +8,7 @@
#include <enet/WebSocket.hpp>
#include <map>
#include <etk/stdTools.hpp>
#include <string.h>
#include <cstring>
#include <random>
#include <algue/base64.hpp>
#include <algue/sha1.hpp>