[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:43:44 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=cc8953b
The following commit has been merged in the master branch:
commit cc8953be16da9b7f579462a5977a8fa11cb682d5
Author: Robin Mills <robin at clanmills.com>
Date: Mon Jun 10 16:49:10 2013 +0000
Issue: #906
---
src/basicio.cpp | 74 +++++++++++++++++++++++++++++----------------------------
1 file changed, 38 insertions(+), 36 deletions(-)
diff --git a/src/basicio.cpp b/src/basicio.cpp
index a99eaad..634791a 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -264,7 +264,7 @@ namespace Exiv2 {
#else
void FileIo::Impl::copyXattrFrom(const FileIo&)
#endif
- {
+ {
#if defined(__APPLE__)
# if defined(EXV_UNICODE_PATH)
# error No xattr API for MacOS X with unicode support
@@ -292,13 +292,15 @@ namespace Exiv2 {
if (::getxattr(src.p_->path_.c_str(), name, value, sizeof(value), 0, 0) != valueSize) {
throw Error(2, src.p_->path_, strError(), "getxattr");
}
-#ifdef DEBUG
+// #906. Mountain Lion 'sandbox' terminates the app when we call setxattr
+#ifndef __APPLE__
+#ifdef DEBUG
EXV_DEBUG << "Copying xattr \"" << name << "\" with value size " << valueSize << "
";
#endif
if (::setxattr(path_.c_str(), name, value, valueSize, 0, 0) != 0) {
throw Error(2, path_, strError(), "setxattr");
}
- }
+#endif
#else
// No xattr support for this platform.
#endif
@@ -541,7 +543,7 @@ namespace Exiv2 {
int ret = p_->stat(buf);
#if defined WIN32 && !defined __CYGWIN__
DWORD nlink = p_->winNumberOfLinks();
-#else
+#else
nlink_t nlink = buf.st_nlink;
#endif
@@ -823,26 +825,26 @@ namespace Exiv2 {
}
#if defined(_MSC_VER)
- int FileIo::seek( uint64_t offset, Position pos )
- {
- assert(p_->fp_ != 0);
-
- int fileSeek = 0;
- switch (pos) {
- case BasicIo::cur: fileSeek = SEEK_CUR; break;
- case BasicIo::beg: fileSeek = SEEK_SET; break;
- case BasicIo::end: fileSeek = SEEK_END; break;
- }
-
- if (p_->switchMode(Impl::opSeek) != 0) return 1;
+ int FileIo::seek( uint64_t offset, Position pos )
+ {
+ assert(p_->fp_ != 0);
+
+ int fileSeek = 0;
+ switch (pos) {
+ case BasicIo::cur: fileSeek = SEEK_CUR; break;
+ case BasicIo::beg: fileSeek = SEEK_SET; break;
+ case BasicIo::end: fileSeek = SEEK_END; break;
+ }
+
+ if (p_->switchMode(Impl::opSeek) != 0) return 1;
#ifdef _WIN64
- return _fseeki64(p_->fp_, offset, fileSeek);
+ return _fseeki64(p_->fp_, offset, fileSeek);
#else
- return std::fseek(p_->fp_,static_cast<long>(offset), fileSeek);
+ return std::fseek(p_->fp_,static_cast<long>(offset), fileSeek);
#endif
- }
+ }
#else
- int FileIo::seek(long offset, Position pos)
+ int FileIo::seek(long offset, Position pos)
{
assert(p_->fp_ != 0);
@@ -1132,23 +1134,23 @@ namespace Exiv2 {
}
#if defined(_MSC_VER)
- int MemIo::seek( uint64_t offset, Position pos )
- {
- uint64_t newIdx = 0;
-
- switch (pos) {
- case BasicIo::cur: newIdx = p_->idx_ + offset; break;
- case BasicIo::beg: newIdx = offset; break;
- case BasicIo::end: newIdx = p_->size_ + offset; break;
- }
-
- if ( /*newIdx < 0 || */ newIdx > static_cast<uint64_t>(p_->size_) ) return 1;
- p_->idx_ = static_cast<long>(newIdx); //not very sure about this. need more test!! - note by Shawn fly2xj at gmail.com //TODO
- p_->eof_ = false;
- return 0;
- }
+ int MemIo::seek( uint64_t offset, Position pos )
+ {
+ uint64_t newIdx = 0;
+
+ switch (pos) {
+ case BasicIo::cur: newIdx = p_->idx_ + offset; break;
+ case BasicIo::beg: newIdx = offset; break;
+ case BasicIo::end: newIdx = p_->size_ + offset; break;
+ }
+
+ if ( /*newIdx < 0 || */ newIdx > static_cast<uint64_t>(p_->size_) ) return 1;
+ p_->idx_ = static_cast<long>(newIdx); //not very sure about this. need more test!! - note by Shawn fly2xj at gmail.com //TODO
+ p_->eof_ = false;
+ return 0;
+ }
#else
- int MemIo::seek(long offset, Position pos)
+ int MemIo::seek(long offset, Position pos)
{
long newIdx = 0;
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list