[haiku-commits] haiku: hrev48454 - src/apps/cortex/addons/LoggingConsumer

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 7 Dec 2014 17:05:48 +0100 (CET)

hrev48454 adds 1 changeset to branch 'master'
old head: 74349b4ff4ccb161c2e5e7a6a4a219ee6d98fe59
new head: d26095f20f5348f9fffac6a06d2b491229edb357
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d26095f+%5E74349b4

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

d26095f: Cortex: Fix build on x86_64 (and others?)

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

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

Revision:    hrev48454
Commit:      d26095f20f5348f9fffac6a06d2b491229edb357
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d26095f
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Sun Dec  7 16:05:42 2014 UTC

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

4 files changed, 14 insertions(+), 11 deletions(-)
src/apps/cortex/addons/LoggingConsumer/Jamfile          |  2 +-
src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp    | 13 ++++++++-----
.../addons/LoggingConsumer/LoggingConsumerAddOn.cpp     |  7 +++----
.../cortex/addons/LoggingConsumer/NodeHarnessWin.cpp    |  3 ++-

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

diff --git a/src/apps/cortex/addons/LoggingConsumer/Jamfile 
b/src/apps/cortex/addons/LoggingConsumer/Jamfile
index 1fa2834..8271fa0 100644
--- a/src/apps/cortex/addons/LoggingConsumer/Jamfile
+++ b/src/apps/cortex/addons/LoggingConsumer/Jamfile
@@ -11,5 +11,5 @@ Application cortex_logging_consumer.media_addon :
        NodeHarnessWin.cpp
        LogWriter.cpp
        LoggingConsumer.cpp
-       : be media
+       : be media [ TargetLibstdc++ ]
 ;
diff --git a/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp 
b/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp
index d5e7d97..cbe92c3 100644
--- a/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp
+++ b/src/apps/cortex/addons/LoggingConsumer/LogWriter.cpp
@@ -232,7 +232,8 @@ LogWriter::HandleMessage(log_what what, const log_message& 
msg)
        if (mFilters.find(what) != mFilters.end()) return;
 
        // always write the message's type and timestamp
-       sprintf(buf, "%-24s : realtime = %Ld, perftime = %Ld\n", 
log_what_to_string(what), msg.tstamp, msg.now);
+       sprintf(buf, "%-24s : realtime = %" B_PRIdBIGTIME ", perftime = %" 
B_PRIdBIGTIME "\n",
+               log_what_to_string(what), msg.tstamp, msg.now);
        mWriteBuf = buf;
 
        // put any special per-message-type handling here
@@ -245,7 +246,8 @@ LogWriter::HandleMessage(log_what what, const log_message& 
msg)
        case LOG_BUFFER_RECEIVED:
                if (msg.buffer_data.offset < 0)
                {
-                       sprintf(buf, "\tstart = %Ld, offset = %Ld\n", 
msg.buffer_data.start_time, msg.buffer_data.offset);
+                       sprintf(buf, "\tstart = %" B_PRIdBIGTIME ", offset = %" 
B_PRIdBIGTIME "\n",
+                               msg.buffer_data.start_time, 
msg.buffer_data.offset);
                        mWriteBuf += buf;
                        sprintf(buf, "\tBuffer received *LATE*\n");
                        mWriteBuf += buf;
@@ -253,18 +255,19 @@ LogWriter::HandleMessage(log_what what, const 
log_message& msg)
                break;
 
        case LOG_SET_PARAM_HANDLED:
-               sprintf(buf, "\tparam id = %ld, value = %f\n", msg.param.id, 
msg.param.value);
+               sprintf(buf, "\tparam id = %" B_PRId32 ", value = %f\n", 
msg.param.id, msg.param.value);
                mWriteBuf += buf;
                break;
 
        case LOG_INVALID_PARAM_HANDLED:
        case LOG_GET_PARAM_VALUE:
-               sprintf(buf, "\tparam id = %ld\n", msg.param.id);
+               sprintf(buf, "\tparam id = %" B_PRId32 "\n", msg.param.id);
                mWriteBuf += buf;
                break;
 
        case LOG_BUFFER_HANDLED:
-               sprintf(buf, "\tstart = %Ld, offset = %Ld\n", 
msg.buffer_data.start_time, msg.buffer_data.offset);
+               sprintf(buf, "\tstart = %" B_PRIdBIGTIME ", offset = %" 
B_PRIdBIGTIME "\n",
+                       msg.buffer_data.start_time, msg.buffer_data.offset);
                mWriteBuf += buf;
                if (msg.buffer_data.offset < 0)
                {
diff --git a/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp 
b/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp
index 38d5a8a..e64a132 100644
--- a/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp
+++ b/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp
@@ -80,11 +80,10 @@ status_t LoggingConsumerAddOn::GetFlavorAt(
 
        flavor_info* pInfo = new flavor_info;
        pInfo->internal_id = n;
-       pInfo->name = "LoggingConsumer";
-       pInfo->info =
-               "An add-on version of the LoggingConsumer node.\n"
+       strcpy(pInfo->name, "LoggingConsumer");
+       strcpy(pInfo->info, "An add-on version of the LoggingConsumer node.\n"
                "See the Be Developer Newsletter III.18: 5 May, 1999\n"
-               "adapted by Eric Moon (4 June, 1999)";
+               "adapted by Eric Moon (4 June, 1999)");
        pInfo->kinds = B_BUFFER_CONSUMER | B_CONTROLLABLE;
        pInfo->flavor_flags = 0;
        pInfo->possible_count = 0;
diff --git a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp 
b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp
index df486b6..4124029 100644
--- a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp
+++ b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp
@@ -43,6 +43,7 @@
 #include <media/TimeSource.h>
 #include <media/MediaTheme.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 const int32 BUTTON_CONNECT = 'Cnct';
 const int32 BUTTON_START = 'Strt';
@@ -199,7 +200,7 @@ NodeHarnessWin::MessageReceived(BMessage *msg)
                        // for video input, we need to set the downstream 
latency for record -> playback
                        bigtime_t latency;
                        r->GetLatencyFor(mConnection.producer, &latency);
-                       printf("Setting producer run mode latency to %Ld\n", 
latency);
+                       printf("Setting producer run mode latency to %" 
B_PRIdBIGTIME "\n", latency);
                        r->SetProducerRunModeDelay(mConnection.producer, 
latency + 6000);
 
                        // preroll first, to be a good citizen


Other related posts:

  • » [haiku-commits] haiku: hrev48454 - src/apps/cortex/addons/LoggingConsumer - kallisti5