Commit 90980c50 authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac558] Fix minor platform-dependent issues

Fixes two issues:
1. src/lib/log/Makefile.am referenced a now-deleted file - this
   caused issues building the logging code on some platforms.
2. The message compiler used ctime_r(), which causes a problem on
   Solaris, which implements a non POSIX-compliant version (it has
   a third argument).  As the compiler is not multi-threaded, it
   was replaced with a call to ctime().
parent 66f19895
......@@ -10,7 +10,7 @@ CLEANFILES = *.gcno *.gcda
lib_LTLIBRARIES = liblog.la
liblog_la_SOURCES =
liblog_la_SOURCES += dbglevels.h
liblog_la_SOURCES += dummylog.h dummylog.cc Message.h
liblog_la_SOURCES += dummylog.h dummylog.cc
liblog_la_SOURCES += filename.h filename.cc
liblog_la_SOURCES += logger.cc logger.h
liblog_la_SOURCES += logger_support.cc logger_support.h
......
......@@ -101,13 +101,10 @@ static void usage() {
static string currentTime() {
// Get the current time.
// Get a text representation of the current time.
time_t curtime;
time(&curtime);
// Format it
char buffer[32];
ctime_r(&curtime, buffer);
char* buffer = ctime(&curtime);
// Convert to string and strip out the trailing newline
string current_time = buffer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment