revert change to use std::time_t (mingw64 has abi issues)
This commit is contained in:
parent
cde9457fdb
commit
93f400265b
|
@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <ctime>
|
|
||||||
|
|
||||||
#include "libtorrent/config.hpp"
|
#include "libtorrent/config.hpp"
|
||||||
#include "libtorrent/string_view.hpp"
|
#include "libtorrent/string_view.hpp"
|
||||||
|
@ -95,9 +94,9 @@ namespace libtorrent
|
||||||
struct file_status
|
struct file_status
|
||||||
{
|
{
|
||||||
std::int64_t file_size;
|
std::int64_t file_size;
|
||||||
std::time_t atime;
|
std::uint64_t atime;
|
||||||
std::time_t mtime;
|
std::uint64_t mtime;
|
||||||
std::time_t ctime;
|
std::uint64_t ctime;
|
||||||
enum {
|
enum {
|
||||||
#if defined TORRENT_WINDOWS
|
#if defined TORRENT_WINDOWS
|
||||||
fifo = 0x1000, // named pipe (fifo)
|
fifo = 0x1000, // named pipe (fifo)
|
||||||
|
|
|
@ -283,7 +283,7 @@ namespace libtorrent
|
||||||
void add_file_borrow(char const* filename, int filename_len
|
void add_file_borrow(char const* filename, int filename_len
|
||||||
, std::string const& path, std::int64_t file_size
|
, std::string const& path, std::int64_t file_size
|
||||||
, std::uint32_t file_flags = 0, char const* filehash = 0
|
, 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
|
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());
|
, std::time_t mtime = 0, string_view symlink_path = string_view());
|
||||||
|
|
||||||
|
|
|
@ -549,7 +549,7 @@ namespace libtorrent
|
||||||
void file_storage::add_file_borrow(char const* filename, int const filename_len
|
void file_storage::add_file_borrow(char const* filename, int const filename_len
|
||||||
, std::string const& path, std::int64_t const file_size
|
, std::string const& path, std::int64_t const file_size
|
||||||
, std::uint32_t const file_flags, char const* filehash
|
, 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);
|
TORRENT_ASSERT_PRECOND(file_size >= 0);
|
||||||
if (!has_parent_path(path))
|
if (!has_parent_path(path))
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace libtorrent
|
||||||
ret.finished_time = int(rd.dict_find_int_value("finished_time"));
|
ret.finished_time = int(rd.dict_find_int_value("finished_time"));
|
||||||
ret.seeding_time = int(rd.dict_find_int_value("seeding_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
|
// scrape data cache
|
||||||
ret.num_complete = int(rd.dict_find_int_value("num_complete", -1));
|
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.added_time = rd.dict_find_int_value("added_time", 0);
|
||||||
ret.completed_time = std::time_t(rd.dict_find_int_value("completed_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
|
// load file priorities except if the add_torrent_param file was set to
|
||||||
// override resume data
|
// override resume data
|
||||||
|
|
Loading…
Reference in New Issue