Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclach04 <Chris.Clark@actian.com>2017-10-27 07:19:54 +0300
committerclach04 <Chris.Clark@actian.com>2017-10-27 07:19:54 +0300
commit1be14d04a05fc8bcb7ad2fdb72fb7f71f50a337f (patch)
tree61bcfb783a931e60bee9092d41b45d0721a62596
parent75a71441d902c6a89f8eb7b5b94a26e7af269d95 (diff)
Fix issue #1104 Solaris compilation errors fread()/fwrite()
Explicit std name space for fread() and fwrite().
-rw-r--r--include/rapidjson/filereadstream.h2
-rw-r--r--include/rapidjson/filewritestream.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/rapidjson/filereadstream.h b/include/rapidjson/filereadstream.h
index b56ea13b..f1bfb7d0 100644
--- a/include/rapidjson/filereadstream.h
+++ b/include/rapidjson/filereadstream.h
@@ -68,7 +68,7 @@ private:
++current_;
else if (!eof_) {
count_ += readCount_;
- readCount_ = fread(buffer_, 1, bufferSize_, fp_);
+ readCount_ = std::fread(buffer_, 1, bufferSize_, fp_);
bufferLast_ = buffer_ + readCount_ - 1;
current_ = buffer_;
diff --git a/include/rapidjson/filewritestream.h b/include/rapidjson/filewritestream.h
index 6378dd60..3811f8b8 100644
--- a/include/rapidjson/filewritestream.h
+++ b/include/rapidjson/filewritestream.h
@@ -62,7 +62,7 @@ public:
void Flush() {
if (current_ != buffer_) {
- size_t result = fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
+ size_t result = std::fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
if (result < static_cast<size_t>(current_ - buffer_)) {
// failure deliberately ignored at this time
// added to avoid warn_unused_result build errors