Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wesnoth/wesnoth
Browse files Browse the repository at this point in the history
  • Loading branch information
aginor committed Jun 3, 2016
2 parents bdc2f06 + 1ec81a3 commit c6510e9
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
8 changes: 3 additions & 5 deletions INSTALL
Expand Up @@ -11,6 +11,9 @@ Contents
1. Prerequisites
================

Wesnoth requires a compiler with sufficient C++11 support such as GCC 4.7 and
later, or Clang 3.3 and later.

You'll need to have these libraries and their development headers installed in
order to build Wesnoth:

Expand Down Expand Up @@ -92,11 +95,6 @@ also possible to run it directly from the source directory after building. This
may be useful in situations where you don't have root access or need to
rebuild Wesnoth frequently (i.e. for development and testing).

NOTE: It has been reported that using GCC 3.3.6 and earlier versions with
optimizations enabled will result in a build that is incapable of using
multiplayer. See <https://gna.org/bugs/?10326> for further details. We
recommend using GCC 4.x and later to build Wesnoth.


3. SCons Build
==============
Expand Down
4 changes: 0 additions & 4 deletions data/multiplayer/scenarios/2p_Hornshark_Island.cfg
Expand Up @@ -242,7 +242,6 @@
[unit]
side=1
type=Woodsman
id=Clockwork Boy
name= _ "Clockwork Boy"
x,y=1,2
[modifications]
Expand All @@ -254,7 +253,6 @@
[unit]
side=1
type=Woodsman
id=Clockwork Boy
name= _ "Clockwork Boy"
x,y=2,1
[modifications]
Expand Down Expand Up @@ -702,7 +700,6 @@
[unit]
side=2
type=Woodsman
id=Clockwork Boy
name= _ "Clockwork Boy"
x,y=30,27
[modifications]
Expand All @@ -714,7 +711,6 @@
[unit]
side=2
type=Woodsman
id=Clockwork Boy
name= _ "Clockwork Boy"
x,y=29,27
[modifications]
Expand Down
2 changes: 2 additions & 0 deletions src/desktop/dbus_notification.cpp
Expand Up @@ -32,6 +32,8 @@
#include <stdlib.h>
#include <string>

#pragma GCC diagnostic ignored "-Wold-style-cast"

using boost::uint32_t;

static lg::log_domain log_desktop("desktop");
Expand Down
4 changes: 4 additions & 0 deletions src/desktop/open.cpp
Expand Up @@ -79,9 +79,13 @@ bool open_object(const std::string& path_or_url)
}

if(child_status) {
//Those status check macros seem to trigger old style casts on some compiler versions
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
if(WIFEXITED(child_status)) {
ERR_DU << "open_object(): " << launcher << " returned "
<< WEXITSTATUS(child_status) << '\n';
#pragma GCC diagnostic pop
} else {
ERR_DU << "open_object(): " << launcher << " failed" << std::endl;
}
Expand Down
2 changes: 2 additions & 0 deletions src/server/player_connection.hpp
Expand Up @@ -19,7 +19,9 @@
#include "simple_wml.hpp"
#include "player.hpp"

#ifndef _WIN32
#define BOOST_ASIO_DISABLE_THREADS
#endif
#include <boost/asio.hpp>
#include <boost/shared_ptr.hpp>

Expand Down
6 changes: 6 additions & 0 deletions src/server/server.cpp
Expand Up @@ -406,7 +406,9 @@ server::server(int port, bool keep_alive, const std::string& config_file, size_t
last_stats_(last_ping_),
last_uh_clean_(last_ping_),
cmd_handlers_(),
#ifndef _WIN32
sighup_(io_service_, SIGHUP),
#endif
sigs_(io_service_, SIGINT, SIGTERM),
timer_(io_service_)
{
Expand All @@ -424,10 +426,13 @@ server::server(int port, bool keep_alive, const std::string& config_file, size_t
load_config();
ban_manager_.read();

#ifndef _WIN32
sighup_.async_wait(boost::bind(&server::handle_sighup, this, _1, _2));
#endif
sigs_.async_wait(boost::bind(&server::handle_termination, this, _1, _2));
}

#ifndef _WIN32
void server::handle_sighup(const boost::system::error_code& error, int) {
assert(!error);

Expand All @@ -438,6 +443,7 @@ void server::handle_sighup(const boost::system::error_code& error, int) {

sighup_.async_wait(boost::bind(&server::handle_sighup, this, _1, _2));
}
#endif

void server::handle_termination(const boost::system::error_code& error, int signal_number)
{
Expand Down
2 changes: 2 additions & 0 deletions src/server/server.hpp
Expand Up @@ -232,8 +232,10 @@ class server
void searchlog_handler(const std::string &, const std::string &, std::string &, std::ostringstream *);
void dul_handler(const std::string &, const std::string &, std::string &, std::ostringstream *);

#ifndef _WIN32
boost::asio::signal_set sighup_;
void handle_sighup(const boost::system::error_code& error, int signal_number);
#endif
boost::asio::signal_set sigs_;
void handle_termination(const boost::system::error_code& error, int signal_number);

Expand Down
2 changes: 2 additions & 0 deletions src/tests/test_lua.cpp
Expand Up @@ -23,6 +23,8 @@
# include <fenv.h>
#endif

#pragma GCC diagnostic ignored "-Wold-style-cast"

BOOST_AUTO_TEST_SUITE( lua )

static int lua_round(lua_State * L, double d)
Expand Down

0 comments on commit c6510e9

Please sign in to comment.