remotecontrol: fix build on x86_64.

* use a safe source.
This commit is contained in:
Jerome Duval
2017-01-31 20:37:47 +01:00
parent 80bf05b6d2
commit ddfeebc2f8
2 changed files with 209 additions and 3 deletions

View File

@@ -0,0 +1,202 @@
From 46bcf4a2de6f43296ffc3acaf15a15858aecd641 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 31 Jan 2017 20:34:29 +0100
Subject: gcc5 build fix
diff --git a/sources/RCClient/ClientApp.cpp b/sources/RCClient/ClientApp.cpp
index 77d892f..4374be4 100644
--- a/sources/RCClient/ClientApp.cpp
+++ b/sources/RCClient/ClientApp.cpp
@@ -14,6 +14,8 @@
#include "ClientApp.h"
+using namespace std;
+
ClientApp::ClientApp() :
BApplication("application/x-vnd.Titoz-RemoteControlClient"),
mInputClient(0),
diff --git a/sources/RCClient/InputClient.cpp b/sources/RCClient/InputClient.cpp
index 226859e..d9e1aca 100644
--- a/sources/RCClient/InputClient.cpp
+++ b/sources/RCClient/InputClient.cpp
@@ -55,7 +55,7 @@ void InputClient::SendMessage(const BMessage *msg)
}
}
-void InputClient::EnableFilter(bool enable=true)
+void InputClient::EnableFilter(bool enable)
{
if(enable)
mClio->WriteBytes(&RCMessage::EnableFilter, sizeof(int32));
diff --git a/sources/RCClient/ScreenClient.cpp b/sources/RCClient/ScreenClient.cpp
index 4a8f919..3beb56c 100644
--- a/sources/RCClient/ScreenClient.cpp
+++ b/sources/RCClient/ScreenClient.cpp
@@ -19,6 +19,8 @@
#include "proto.h"
#include "Password.h"
+using namespace std;
+
ScreenClient::ScreenClient(ClientIO *clio, char const *passwd) :
mClio(clio),
mQuit(false),
diff --git a/sources/RCInputDevice/dbout.cpp b/sources/RCInputDevice/dbout.cpp
index d43923d..8699921 100644
--- a/sources/RCInputDevice/dbout.cpp
+++ b/sources/RCInputDevice/dbout.cpp
@@ -1,7 +1,7 @@
#include "dbout.h"
#ifdef DBOUT_TO_STDOUT
-ostream &dbout=cout;
+std::ostream &dbout=cout;
#else
-ofstream dbout("/boot/home/debug/RCInputDevice", ios::app);
+std::ofstream dbout("/boot/home/debug/RCInputDevice", std::ios::app);
#endif
diff --git a/sources/RCInputDevice/dbout.h b/sources/RCInputDevice/dbout.h
index 5bca581..f868989 100644
--- a/sources/RCInputDevice/dbout.h
+++ b/sources/RCInputDevice/dbout.h
@@ -1,7 +1,7 @@
-#include <fstream.h>
+#include <fstream>
#ifdef DBOUT_TO_STDOUT
-extern ostream &dbout;
+extern std::ostream &dbout;
#else
-extern ofstream dbout;
+extern std::ofstream dbout;
#endif
diff --git a/sources/RCServer/InputListener.cpp b/sources/RCServer/InputListener.cpp
index 53dd858..1e5614a 100644
--- a/sources/RCServer/InputListener.cpp
+++ b/sources/RCServer/InputListener.cpp
@@ -8,6 +8,8 @@
#include "InputServer.h"
#include "InputListener.h"
+using namespace std;
+
InputListener::InputListener(int32 sock, char const *passwd) :
mSock(sock),
mPasswd(passwd)
diff --git a/sources/RCServer/InputServer.cpp b/sources/RCServer/InputServer.cpp
index 6b8d82e..0657383 100644
--- a/sources/RCServer/InputServer.cpp
+++ b/sources/RCServer/InputServer.cpp
@@ -8,6 +8,8 @@
#include "proto.h"
#include "Password.h"
+using namespace std;
+
InputServer::InputServer(ClientIO *clio, char const *passwd) :
mClio(clio),
mThid(B_ERROR),
diff --git a/sources/RCServer/Main.cpp b/sources/RCServer/Main.cpp
index 8f45d17..3b84aed 100644
--- a/sources/RCServer/Main.cpp
+++ b/sources/RCServer/Main.cpp
@@ -1,4 +1,4 @@
-#include <iostream.h>
+#include <iostream>
#include <netinet/in.h>
#include <string.h>
#include <stdlib.h>
@@ -15,6 +15,8 @@
#include "InputListener.h"
#include "ScreenListener.h"
+using namespace std;
+
struct
{
int32 porti;
diff --git a/sources/RCServer/Preferences.cpp b/sources/RCServer/Preferences.cpp
index e08102b..6422a6f 100644
--- a/sources/RCServer/Preferences.cpp
+++ b/sources/RCServer/Preferences.cpp
@@ -1,5 +1,6 @@
#include <File.h>
#include <Autolock.h>
+#include <string.h>
#include "Preferences.h"
diff --git a/sources/RCServer/ScreenListener.cpp b/sources/RCServer/ScreenListener.cpp
index 02b6e6a..c09925c 100644
--- a/sources/RCServer/ScreenListener.cpp
+++ b/sources/RCServer/ScreenListener.cpp
@@ -9,6 +9,8 @@
#include "ScreenServer.h"
#include "ScreenListener.h"
+using namespace std;
+
ScreenListener::ScreenListener(int32 sock, char const *passwd) :
mSock(sock),
mPasswd(passwd)
diff --git a/sources/RCServer/ScreenServer.cpp b/sources/RCServer/ScreenServer.cpp
index f93ed52..cfcbea4 100644
--- a/sources/RCServer/ScreenServer.cpp
+++ b/sources/RCServer/ScreenServer.cpp
@@ -20,6 +20,8 @@
#include "Preferences.h"
#include "Password.h"
+using namespace std;
+
ScreenServer::ScreenServer(ClientIO *clio, int32 address, char const *passwd) :
mClio(clio),
mThid(B_ERROR),
diff --git a/sources/RCServer/ScreenShot.cpp b/sources/RCServer/ScreenShot.cpp
index a98fb9b..0e3ce13 100644
--- a/sources/RCServer/ScreenShot.cpp
+++ b/sources/RCServer/ScreenShot.cpp
@@ -5,6 +5,8 @@
#include "ScreenShot.h"
+using namespace std;
+
ScreenShot::ScreenShot() :
mShot(0)
{
@@ -70,7 +72,7 @@ void ScreenShot::Refresh(bool draw_cursor)
}
}
-status_t ScreenShot::ReadBitmap(BBitmap *buffer, BRect *bounds=0)
+status_t ScreenShot::ReadBitmap(BBitmap *buffer, BRect *bounds)
{
if(!mShot)
return B_ERROR;
@@ -96,7 +98,7 @@ status_t ScreenShot::ReadBitmap(BBitmap *buffer, BRect *bounds=0)
return B_OK;
}
-status_t ScreenShot::GetBitmap(BBitmap **buffer, BRect *bounds=0)
+status_t ScreenShot::GetBitmap(BBitmap **buffer, BRect *bounds)
{
if((!buffer) || (!mShot))
return B_ERROR;
diff --git a/sources/Shared/Password.cpp b/sources/Shared/Password.cpp
index 14da8f4..0ba0026 100644
--- a/sources/Shared/Password.cpp
+++ b/sources/Shared/Password.cpp
@@ -1,6 +1,7 @@
#include "Password.h"
#include "ClientIO.h"
#include "proto.h"
+#include <string.h>
Password::Password(ClientIO *clio) :
mClio(clio)
--
2.10.2

View File

@@ -7,10 +7,14 @@ the RCClient client and RCServer server. Both are to be run in the terminal."
HOMEPAGE="http://thomas.thiriez.free.fr/beos/RemoteControl/index.html"
COPYRIGHT="2001 Thomas Thiriez"
LICENSE="RemoteControl Unknown"
REVISION="1"
SOURCE_URI="git://github.com/HaikuArchives/RemoteControl#c59e89e3643e4693a75e5b5456596533d068cc29"
REVISION="2"
srcGitRev="c59e89e3643e4693a75e5b5456596533d068cc29"
SOURCE_URI="https://github.com/HaikuArchives/RemoteControl/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="6b6649d9efaa7e12418e2f1ca12ced1a9221ab6a7be5dbc8827aefcb94182bf0"
SOURCE_DIR="RemoteControl-$srcGitRev"
PATCHES="remotecontrol-$portVersion.patchset"
ARCHITECTURES="x86 x86_gcc2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
remotecontrol = $portVersion