Remove uses of build date/time.

Uses of __DATE__ and __TIME__ are blocking deterministic Chromium
builds. We're not really making use of these, and if anything they're
likely to be misleading as it's impossible to distinguish between a new
revision and a freshly-built old branch.

R=mflodman@webrtc.org, tnakamura@webrtc.org
BUG=3983

Review URL: https://webrtc-codereview.appspot.com/27039004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7635 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-11-05 17:40:28 +00:00
parent 0bae1fab4a
commit 6a364fe11b
12 changed files with 2 additions and 128 deletions

View File

@ -553,15 +553,6 @@ void TraceImpl::WriteToFile() {
trace_file_.Write(message, length);
row_count_text_++;
}
length = AddBuildInfo(message);
if (length != -1) {
message[length + 1] = 0;
message[length] = '\n';
message[length - 1] = '\n';
trace_file_.Write(message, length + 1);
row_count_text_++;
row_count_text_++;
}
}
uint16_t length = length_[local_queue_active][idx];
message_queue_[local_queue_active][idx][length] = 0;

View File

@ -72,7 +72,6 @@ class TraceImpl : public Trace {
virtual int32_t AddTime(char* trace_message,
const TraceLevel level) const = 0;
virtual int32_t AddBuildInfo(char* trace_message) const = 0;
virtual int32_t AddDateTimeInfo(char* trace_message) const = 0;
static bool Run(void* obj);

View File

@ -17,20 +17,6 @@
#include <sys/time.h>
#include <time.h>
#if defined(_DEBUG)
#define BUILDMODE "d"
#elif defined(DEBUG)
#define BUILDMODE "d"
#elif defined(NDEBUG)
#define BUILDMODE "r"
#else
#define BUILDMODE "?"
#endif
#define BUILDTIME __TIME__
#define BUILDDATE __DATE__
// example: "Oct 10 2002 12:05:30 r"
#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
namespace webrtc {
TracePosix::TracePosix()
@ -86,12 +72,6 @@ int32_t TracePosix::AddTime(char* trace_message, const TraceLevel level) const {
return 22;
}
int32_t TracePosix::AddBuildInfo(char* trace_message) const {
sprintf(trace_message, "Build info: %s", BUILDINFO);
// Include NULL termination (hence + 1).
return strlen(trace_message) + 1;
}
int32_t TracePosix::AddDateTimeInfo(char* trace_message) const {
time_t t;
time(&t);

View File

@ -26,7 +26,6 @@ class TracePosix : public TraceImpl {
virtual int32_t AddTime(char* trace_message, const TraceLevel level) const
OVERRIDE;
virtual int32_t AddBuildInfo(char* trace_message) const OVERRIDE;
virtual int32_t AddDateTimeInfo(char* trace_message) const OVERRIDE;
private:

View File

@ -15,20 +15,6 @@
#include "Mmsystem.h"
#if defined(_DEBUG)
#define BUILDMODE "d"
#elif defined(DEBUG)
#define BUILDMODE "d"
#elif defined(NDEBUG)
#define BUILDMODE "r"
#else
#define BUILDMODE "?"
#endif
#define BUILDTIME __TIME__
#define BUILDDATE __DATE__
// Example: "Oct 10 2002 12:05:30 r"
#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
namespace webrtc {
TraceWindows::TraceWindows()
: prev_api_tick_count_(0),
@ -84,13 +70,6 @@ int32_t TraceWindows::AddTime(char* trace_message,
return 22;
}
int32_t TraceWindows::AddBuildInfo(char* trace_message) const {
// write data and time to text file
sprintf(trace_message, "Build info: %s", BUILDINFO);
// Include NULL termination (hence + 1).
return static_cast<int32_t>(strlen(trace_message) + 1);
}
int32_t TraceWindows::AddDateTimeInfo(char* trace_message) const {
prev_api_tick_count_ = timeGetTime();
prev_tick_count_ = prev_api_tick_count_;

View File

@ -25,7 +25,6 @@ class TraceWindows : public TraceImpl {
virtual int32_t AddTime(char* trace_message, const TraceLevel level) const;
virtual int32_t AddBuildInfo(char* trace_message) const;
virtual int32_t AddDateTimeInfo(char* trace_message) const;
private:
volatile mutable uint32_t prev_api_tick_count_;

View File

@ -10,7 +10,6 @@
#include "webrtc/video_engine/vie_base_impl.h"
#include <sstream>
#include <string>
#include <utility>
@ -329,23 +328,8 @@ int ViEBaseImpl::StopReceive(const int video_channel) {
}
int ViEBaseImpl::GetVersion(char version[1024]) {
assert(kViEVersionMaxMessageSize == 1024);
if (!version) {
shared_data_.SetLastError(kViEBaseInvalidArgument);
return -1;
}
// Add WebRTC Version.
std::stringstream version_stream;
version_stream << "VideoEngine 39" << std::endl;
// Add build info.
version_stream << "Build: " << BUILDINFO << std::endl;
int version_length = version_stream.tellp();
assert(version_length < 1024);
memcpy(version, version_stream.str().c_str(), version_length);
version[version_length] = '\0';
assert(version != NULL);
strcpy(version, "VideoEngine 39");
return 0;
}

View File

@ -64,11 +64,6 @@ class ViEBaseImpl
ViESharedData* shared_data() { return &shared_data_; }
private:
// Version functions.
int32_t AddViEVersion(char* str) const;
int32_t AddBuildInfo(char* str) const;
int32_t AddExternalTransportBuild(char* str) const;
int CreateChannel(int& video_channel, int original_channel, // NOLINT
bool sender);

View File

@ -35,8 +35,6 @@ enum { kViEMinKeyRequestIntervalMs = 300 };
// ViEBase
enum { kViEMaxNumberOfChannels = 64 };
enum { kViEVersionMaxMessageSize = 1024 };
enum { kViEMaxModuleVersionSize = 960 };
// ViECapture
enum { kViEMaxCaptureDevices = 256 };
@ -101,21 +99,6 @@ inline int ChannelId(const int moduleId) {
return static_cast<int>(moduleId & 0xffff);
}
// Build information macros
#if defined(_DEBUG) || defined(DEBUG)
#define BUILDMODE "d"
#elif defined(NDEBUG)
#define BUILDMODE "r"
#else
#define BUILDMODE "?"
#endif
#define BUILDTIME __TIME__
#define BUILDDATE __DATE__
// Example: "Oct 10 2002 12:05:30 r".
#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
// Windows specific.
#if defined(_WIN32)
#define RENDER_MODULE_TYPE kRenderWindows

View File

@ -777,15 +777,6 @@ int VoEBaseImpl::GetVersion(char version[1024])
accLen += len;
assert(accLen < kVoiceEngineVersionMaxMessageSize);
len = AddBuildInfo(versionPtr);
if (len == -1)
{
return -1;
}
versionPtr += len;
accLen += len;
assert(accLen < kVoiceEngineVersionMaxMessageSize);
#ifdef WEBRTC_EXTERNAL_TRANSPORT
len = AddExternalTransportBuild(versionPtr);
if (len == -1)
@ -828,11 +819,6 @@ int VoEBaseImpl::GetVersion(char version[1024])
return 0;
}
int32_t VoEBaseImpl::AddBuildInfo(char* str) const
{
return sprintf(str, "Build: %s\n", BUILDINFO);
}
int32_t VoEBaseImpl::AddVoEVersion(char* str) const
{
return sprintf(str, "VoiceEngine 4.1.0\n");

View File

@ -146,7 +146,6 @@ private:
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms);
int32_t AddBuildInfo(char* str) const;
int32_t AddVoEVersion(char* str) const;
// Initialize channel by setting Engine Information then initializing

View File

@ -127,26 +127,6 @@ enum { kVoiceEngineMaxRtpExtensionId = 14 };
} // namespace webrtc
// ----------------------------------------------------------------------------
// Build information macros
// ----------------------------------------------------------------------------
#if defined(_DEBUG)
#define BUILDMODE "d"
#elif defined(DEBUG)
#define BUILDMODE "d"
#elif defined(NDEBUG)
#define BUILDMODE "r"
#else
#define BUILDMODE "?"
#endif
#define BUILDTIME __TIME__
#define BUILDDATE __DATE__
// Example: "Oct 10 2002 12:05:30 r"
#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
// ----------------------------------------------------------------------------
// Macros
// ----------------------------------------------------------------------------