From fc4a18d3398ec360b28802dff990e2c1c8d368b5 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 30 Jun 2017 23:32:45 +0200 Subject: nxcomp/{configure.ac,Log.cpp}: implement configure-time std::put_time check and use macro value in Log.cpp. --- nxcomp/src/Log.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nxcomp/src') diff --git a/nxcomp/src/Log.cpp b/nxcomp/src/Log.cpp index 3ff47aea8..66ae1bd78 100644 --- a/nxcomp/src/Log.cpp +++ b/nxcomp/src/Log.cpp @@ -31,6 +31,7 @@ #include #include "Log.h" +#include "config.h" NXLog nx_log; @@ -78,7 +79,7 @@ std::string NXLog::stamp_to_string(const NXLogStamp& stamp) const } else { - #if __cplusplus >= 201103L && (!defined(__GNUC__) || __GNUC__ >= 5) + #if HAVE_STD_PUT_TIME oss << " " << std::put_time(&timeinfo, "%Y/%m/%d %H:%M:%S"); #else oss << timestamp.tv_sec; -- cgit v1.2.3