X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_filename.cc;h=177d515028b013a9ad6d778e7a9a69b495acde9c;hb=b52bf1a42c71ae943eaff2bca4c309618c173ab3;hp=19ead2d0266995d9615225789a8e3c87507367cf;hpb=2bdb078b6307c44db9d2d3ae3d090aa3c0b8ae29;p=ardour.git diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index 19ead2d026..177d515028 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -26,6 +26,7 @@ #include "pbd/xml++.h" #include "pbd/convert.h" #include "pbd/enumwriter.h" +#include "pbd/localtime_r.h" #include "ardour/libardour_visibility.h" #include "ardour/session.h" @@ -36,7 +37,7 @@ #include "ardour/export_timespan.h" #include "ardour/utils.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace PBD; using namespace Glib; @@ -62,7 +63,7 @@ ExportFilename::ExportFilename (Session & session) : { time_t rawtime; std::time (&rawtime); - time_struct = localtime (&rawtime); + localtime_r (&rawtime, &time_struct); folder = session.session_directory().export_path(); @@ -106,7 +107,7 @@ int ExportFilename::set_state (const XMLNode & node) { XMLNode * child; - XMLProperty * prop; + XMLProperty const * prop; FieldPair pair; child = node.child ("Folder"); @@ -339,7 +340,7 @@ string ExportFilename::get_formatted_time (string const & format) const { char buffer [80]; - strftime (buffer, 80, format.c_str(), time_struct); + strftime (buffer, 80, format.c_str(), &time_struct); string return_value (buffer); return return_value; @@ -371,7 +372,7 @@ ExportFilename::get_field (XMLNode const & node, string const & name) XMLNodeList children = node.children(); for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) { - XMLProperty * prop = (*it)->property ("name"); + XMLProperty const * prop = (*it)->property ("name"); if (prop && !prop->value().compare (name)) { prop = (*it)->property ("enabled");