From d26095f20f5348f9fffac6a06d2b491229edb357 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 7 Dec 2014 16:05:42 +0000 Subject: [PATCH] Cortex: Fix build on x86_64 (and others?) --- src/apps/cortex/addons/LoggingConsumer/Jamfile | 2 +- .../cortex/addons/LoggingConsumer/LogWriter.cpp | 13 ++++++++----- .../addons/LoggingConsumer/LoggingConsumerAddOn.cpp | 7 +++---- .../addons/LoggingConsumer/NodeHarnessWin.cpp | 3 ++- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/apps/cortex/addons/LoggingConsumer/Jamfile b/src/apps/cortex/addons/LoggingConsumer/Jamfile index 1fa2834031..8271fa0f92 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 d5e7d97563..cbe92c30b2 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 38d5a8a3c7..e64a13212f 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 df486b62f5..4124029755 100644 --- a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp +++ b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp @@ -43,6 +43,7 @@ #include #include #include +#include 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