Fix windows builds

main
Luis Díaz Más 3 years ago
parent e07c3771da
commit 208ec70df8

@ -59,7 +59,8 @@
#ifdef EXV_HAVE_UNISTD_H #ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // for stat() # include <unistd.h> // for stat()
#endif #endif
#ifdef _MSC_VER
#if defined(_WIN32) || defined(__CYGWIN__)
# include <sys/utime.h> # include <sys/utime.h>
#include <Windows.h> #include <Windows.h>
#include <fcntl.h> #include <fcntl.h>

@ -39,7 +39,7 @@
#include <cctype> #include <cctype>
#include <regex> #include <regex>
#if defined(_MSC_VER) #if defined(_WIN32) || defined(__CYGWIN__)
#include <Windows.h> #include <Windows.h>
#include <fcntl.h> #include <fcntl.h>
#include <io.h> #include <io.h>

@ -712,7 +712,7 @@ namespace Exiv2 {
return; return;
std::ostringstream value; std::ostringstream value;
for (size_t i = 0; i < pos->count(); ++i) { for (size_t i = 0; i < pos->count(); ++i) {
value << static_cast<char>(pos->toInt64(i)); value << static_cast<char>(pos->toInt64(static_cast<long>(i)));
} }
(*xmpData_)[to] = value.str(); (*xmpData_)[to] = value.str();
if (erase_) exifData_->erase(pos); if (erase_) exifData_->erase(pos);

@ -869,7 +869,7 @@ namespace {
{ {
int64_t sum = 0; int64_t sum = 0;
for (size_t i = 0; i < md.count(); ++i) { for (size_t i = 0; i < md.count(); ++i) {
sum += md.toInt64(i); sum += md.toInt64(static_cast<long>(i));
} }
return sum; return sum;
} }

@ -953,8 +953,8 @@ namespace Exiv2 {
meta.SetProperty(ns.c_str(), i.tagName().c_str(), nullptr, options); meta.SetProperty(ns.c_str(), i.tagName().c_str(), nullptr, options);
for (size_t idx = 0; idx < i.count(); ++idx) { for (size_t idx = 0; idx < i.count(); ++idx) {
const std::string item = i.tagName() + "[" + toString(idx + 1) + "]"; const std::string item = i.tagName() + "[" + toString(idx + 1) + "]";
printNode(ns, item, i.toString(idx), 0); printNode(ns, item, i.toString(static_cast<long>(idx)), 0);
meta.SetProperty(ns.c_str(), item.c_str(), i.toString(idx).c_str()); meta.SetProperty(ns.c_str(), item.c_str(), i.toString(static_cast<long>(idx)).c_str());
} }
continue; continue;
} }

Loading…
Cancel
Save