revert change to use std::time_t (mingw64 has abi issues)

This commit is contained in:
arvidn 2016-12-21 23:23:45 -05:00 committed by Arvid Norberg
parent cde9457fdb
commit 93f400265b
4 changed files with 8 additions and 9 deletions

View File

@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include <memory>
#include <string>
#include <functional>
#include <ctime>
#include "libtorrent/config.hpp"
#include "libtorrent/string_view.hpp"
@ -95,9 +94,9 @@ namespace libtorrent
struct file_status
{
std::int64_t file_size;
std::time_t atime;
std::time_t mtime;
std::time_t ctime;
std::uint64_t atime;
std::uint64_t mtime;
std::uint64_t ctime;
enum {
#if defined TORRENT_WINDOWS
fifo = 0x1000, // named pipe (fifo)

View File

@ -283,7 +283,7 @@ namespace libtorrent
void add_file_borrow(char const* filename, int filename_len
, std::string const& path, std::int64_t file_size
, std::uint32_t file_flags = 0, char const* filehash = 0
, std::time_t mtime = 0, string_view symlink_path = string_view());
, std::int64_t mtime = 0, string_view symlink_path = string_view());
void add_file(std::string const& path, std::int64_t file_size, int file_flags = 0
, std::time_t mtime = 0, string_view symlink_path = string_view());

View File

@ -549,7 +549,7 @@ namespace libtorrent
void file_storage::add_file_borrow(char const* filename, int const filename_len
, std::string const& path, std::int64_t const file_size
, std::uint32_t const file_flags, char const* filehash
, std::time_t const mtime, string_view symlink_path)
, std::int64_t const mtime, string_view symlink_path)
{
TORRENT_ASSERT_PRECOND(file_size >= 0);
if (!has_parent_path(path))

View File

@ -117,7 +117,7 @@ namespace libtorrent
ret.finished_time = int(rd.dict_find_int_value("finished_time"));
ret.seeding_time = int(rd.dict_find_int_value("seeding_time"));
ret.last_seen_complete = std::time_t(rd.dict_find_int_value("last_seen_complete"));
ret.last_seen_complete = rd.dict_find_int_value("last_seen_complete");
// scrape data cache
ret.num_complete = int(rd.dict_find_int_value("num_complete", -1));
@ -156,8 +156,8 @@ namespace libtorrent
}
}
ret.added_time = std::time_t(rd.dict_find_int_value("added_time", 0));
ret.completed_time = std::time_t(rd.dict_find_int_value("completed_time", 0));
ret.added_time = rd.dict_find_int_value("added_time", 0);
ret.completed_time = rd.dict_find_int_value("completed_time", 0);
// load file priorities except if the add_torrent_param file was set to
// override resume data