Merge pull request #1105 from clach04/issue_1104_solaris_fread
Fix issue #1104 Solaris compilation errors fread()/fwrite()
This commit is contained in:
commit
5aa79b7272
@ -68,7 +68,7 @@ private:
|
|||||||
++current_;
|
++current_;
|
||||||
else if (!eof_) {
|
else if (!eof_) {
|
||||||
count_ += readCount_;
|
count_ += readCount_;
|
||||||
readCount_ = fread(buffer_, 1, bufferSize_, fp_);
|
readCount_ = std::fread(buffer_, 1, bufferSize_, fp_);
|
||||||
bufferLast_ = buffer_ + readCount_ - 1;
|
bufferLast_ = buffer_ + readCount_ - 1;
|
||||||
current_ = buffer_;
|
current_ = buffer_;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
void Flush() {
|
void Flush() {
|
||||||
if (current_ != buffer_) {
|
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_)) {
|
if (result < static_cast<size_t>(current_ - buffer_)) {
|
||||||
// failure deliberately ignored at this time
|
// failure deliberately ignored at this time
|
||||||
// added to avoid warn_unused_result build errors
|
// added to avoid warn_unused_result build errors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user