BIND 10 master, updated. b3f795e7faf5cde5c864db15ed4ed79faea85b6a [master] Explicitly cast the integer value to streampos.
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Apr 4 15:32:34 UTC 2014
The branch, master has been updated
via b3f795e7faf5cde5c864db15ed4ed79faea85b6a (commit)
from 1b83c74dd9523e9be21c7168e67eb0c8c88ef420 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b3f795e7faf5cde5c864db15ed4ed79faea85b6a
Author: Marcin Siodelski <marcin at isc.org>
Date: Fri Apr 4 17:07:30 2014 +0200
[master] Explicitly cast the integer value to streampos.
Older gcc compiler (4.1) doesn't implicitly cast the integer value to a
streampos value. This caused compilation problems on Centos5. The explicit
cast eliminates this issue.
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/csv_file.cc | 4 ++--
src/lib/util/csv_file.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/csv_file.cc b/src/lib/util/csv_file.cc
index 3abf4ad..2639ece 100644
--- a/src/lib/util/csv_file.cc
+++ b/src/lib/util/csv_file.cc
@@ -170,7 +170,7 @@ CSVFile::checkStreamStatusAndReset(const std::string& operation) const {
}
}
-std::ifstream::pos_type
+std::streampos
CSVFile::size() const {
std::ifstream fs(filename_.c_str());
bool ok = fs.good();
@@ -255,7 +255,7 @@ CSVFile::next(CSVRow& row, const bool skip_validation) {
void
CSVFile::open() {
// If file doesn't exist or is empty, we have to create our own file.
- if (size() == 0) {
+ if (size() == static_cast<std::streampos>(0)) {
recreate();
} else {
diff --git a/src/lib/util/csv_file.h b/src/lib/util/csv_file.h
index 264a993..aab9dec 100644
--- a/src/lib/util/csv_file.h
+++ b/src/lib/util/csv_file.h
@@ -456,7 +456,7 @@ private:
void checkStreamStatusAndReset(const std::string& operation) const;
/// @brief Returns size of the CSV file.
- std::ifstream::pos_type size() const;
+ std::streampos size() const;
/// @brief CSV file name.
std::string filename_;
More information about the bind10-changes
mailing list