[haiku-commits] haiku: hrev47399 - src/apps/remotedesktop

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 18 Jun 2014 00:41:14 +0200 (CEST)

hrev47399 adds 1 changeset to branch 'master'
old head: a852846fc23d5521b1afdd7f7db1588c7308421a
new head: 37b6923b87efb68b6329d28feefcf44bc1b8d1d2
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=37b6923+%5Ea852846

----------------------------------------------------------------------------

37b6923: RemoteDesktop: Fix x86_64 build.

                                         [ Rene Gollent <rene@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47399
Commit:      37b6923b87efb68b6329d28feefcf44bc1b8d1d2
URL:         http://cgit.haiku-os.org/haiku/commit/?id=37b6923
Author:      Rene Gollent <rene@xxxxxxxxxxx>
Date:        Tue Jun 17 22:40:56 2014 UTC

----------------------------------------------------------------------------

2 files changed, 15 insertions(+), 13 deletions(-)
src/apps/remotedesktop/RemoteDesktop.cpp | 22 ++++++++++++----------
src/apps/remotedesktop/RemoteView.cpp    |  6 +++---

----------------------------------------------------------------------------

diff --git a/src/apps/remotedesktop/RemoteDesktop.cpp 
b/src/apps/remotedesktop/RemoteDesktop.cpp
index d350f7d..8fbec99 100644
--- a/src/apps/remotedesktop/RemoteDesktop.cpp
+++ b/src/apps/remotedesktop/RemoteDesktop.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009, Haiku, Inc.
+ * Copyright 2009-2014, Haiku, Inc.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -46,7 +46,8 @@ main(int argc, char *argv[])
 
        for (int32 i = 2; i < argc; i++) {
                if (strcmp(argv[i], "-p") == 0) {
-                       if (argc < i + 1 || sscanf(argv[i + 1], "%lu", 
&listenPort) != 1) {
+                       if (argc < i + 1 || sscanf(argv[i + 1], "%" B_PRIu32, 
&listenPort)
+                               != 1) {
                                print_usage(argv[0]);
                                return 2;
                        }
@@ -56,7 +57,8 @@ main(int argc, char *argv[])
                }
 
                if (strcmp(argv[i], "-s") == 0) {
-                       if (argc < i + 1 || sscanf(argv[i + 1], "%lu", 
&sshPort) != 1) {
+                       if (argc < i + 1 || sscanf(argv[i + 1], "%" B_PRIu32, 
&sshPort)
+                               != 1) {
                                print_usage(argv[0]);
                                return 2;
                        }
@@ -103,8 +105,8 @@ main(int argc, char *argv[])
 
                char shellCommand[4096];
                snprintf(shellCommand, sizeof(shellCommand),
-                       "echo connected; export TARGET_SCREEN=localhost:%lu; 
%s\n",
-                       listenPort, terminalPath.Path());
+                       "echo connected; export TARGET_SCREEN=localhost:%" 
B_PRIu32
+                       "; %s\n", listenPort, terminalPath.Path());
 
                int pipes[4];
                if (pipe(&pipes[0]) != 0 || pipe(&pipes[2]) != 0) {
@@ -129,15 +131,15 @@ main(int argc, char *argv[])
                                close(pipes[i]);
 
                        char localRedirect[50];
-                       sprintf(localRedirect, "localhost:%lu:localhost:%lu",
-                               listenPort + 1, listenPort + 1);
+                       sprintf(localRedirect, "localhost:%" B_PRIu32 
":localhost:%"
+                               B_PRIu32, listenPort + 1, listenPort + 1);
 
                        char remoteRedirect[50];
-                       sprintf(remoteRedirect, "localhost:%lu:localhost:%lu",
-                               listenPort, listenPort);
+                       sprintf(remoteRedirect, "localhost:%" B_PRIu32 
":localhost:%"
+                               B_PRIu32, listenPort, listenPort);
 
                        char portNumber[10];
-                       sprintf(portNumber, "%lu", sshPort);
+                       sprintf(portNumber, "%" B_PRIu32, sshPort);
 
                        int result = execl("ssh", "-C", "-L", localRedirect,
                                "-R", remoteRedirect, "-p", portNumber, argv[1],
diff --git a/src/apps/remotedesktop/RemoteView.cpp 
b/src/apps/remotedesktop/RemoteView.cpp
index b97081c..1f31d75 100644
--- a/src/apps/remotedesktop/RemoteView.cpp
+++ b/src/apps/remotedesktop/RemoteView.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009-2010, Haiku, Inc.
+ * Copyright 2009-2014, Haiku, Inc.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -362,7 +362,7 @@ RemoteView::_CreateState(uint32 token)
 {
        int32 index = fStates.BinarySearchIndexByKey(token, 
&_StateCompareByKey);
        if (index >= 0) {
-               TRACE_ERROR("state for token %lu already in list\n", token);
+               TRACE_ERROR("state for token %" B_PRIu32 " already in list\n", 
token);
                return;
        }
 
@@ -619,7 +619,7 @@ RemoteView::_DrawThread()
 
                engine_state *state = _FindState(token);
                if (state == NULL) {
-                       TRACE_ERROR("didn't find state for token %lu\n", token);
+                       TRACE_ERROR("didn't find state for token %" B_PRIu32 
"\n", token);
                        continue;
                }
 


Other related posts:

  • » [haiku-commits] haiku: hrev47399 - src/apps/remotedesktop - anevilyak